summaryrefslogtreecommitdiffstats
path: root/src/systemctl
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-05-28 15:33:44 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-05-31 23:47:48 +0200
commit5d2a48da126e696dcd61baa75911d7f5fb2d076c (patch)
treebbc8aac0bd238dfd42fd29fc82d6e7e099ae976f /src/systemctl
parentoomd: drop unused key (diff)
downloadsystemd-5d2a48da126e696dcd61baa75911d7f5fb2d076c.tar.xz
systemd-5d2a48da126e696dcd61baa75911d7f5fb2d076c.zip
tree-wide: use _cleanup_set_free_ and friends
Instead of _cleanup_(set_freep) or so.
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-edit.c4
-rw-r--r--src/systemctl/systemctl-list-unit-files.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/systemctl/systemctl-edit.c b/src/systemctl/systemctl-edit.c
index aff823d773..e3f25d52d5 100644
--- a/src/systemctl/systemctl-edit.c
+++ b/src/systemctl/systemctl-edit.c
@@ -14,7 +14,7 @@
#include "terminal-util.h"
int verb_cat(int argc, char *argv[], void *userdata) {
- _cleanup_(hashmap_freep) Hashmap *cached_name_map = NULL, *cached_id_map = NULL;
+ _cleanup_hashmap_free_ Hashmap *cached_name_map = NULL, *cached_id_map = NULL;
_cleanup_(lookup_paths_free) LookupPaths lp = {};
_cleanup_strv_free_ char **names = NULL;
sd_bus *bus;
@@ -197,7 +197,7 @@ static int find_paths_to_edit(
EditFileContext *context,
char **names) {
- _cleanup_(hashmap_freep) Hashmap *cached_name_map = NULL, *cached_id_map = NULL;
+ _cleanup_hashmap_free_ Hashmap *cached_name_map = NULL, *cached_id_map = NULL;
_cleanup_(lookup_paths_free) LookupPaths lp = {};
_cleanup_free_ char *drop_in_alloc = NULL, *suffix = NULL;
const char *drop_in;
diff --git a/src/systemctl/systemctl-list-unit-files.c b/src/systemctl/systemctl-list-unit-files.c
index aad248fe1f..fc1ad9800a 100644
--- a/src/systemctl/systemctl-list-unit-files.c
+++ b/src/systemctl/systemctl-list-unit-files.c
@@ -143,7 +143,7 @@ static int output_unit_file_list(const UnitFileList *units, unsigned c) {
int verb_list_unit_files(int argc, char *argv[], void *userdata) {
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
_cleanup_free_ UnitFileList *units = NULL;
- _cleanup_(hashmap_freep) Hashmap *h = NULL;
+ _cleanup_hashmap_free_ Hashmap *h = NULL;
unsigned c = 0;
const char *state;
char *path;