summaryrefslogtreecommitdiffstats
path: root/src/tmpfiles
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/tmpfiles
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/tmpfiles')
-rw-r--r--src/tmpfiles/offline-passwd.c4
-rw-r--r--src/tmpfiles/test-offline-passwd.c2
-rw-r--r--src/tmpfiles/tmpfiles.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/tmpfiles/offline-passwd.c b/src/tmpfiles/offline-passwd.c
index edf0dfb73d..7b5592b9c2 100644
--- a/src/tmpfiles/offline-passwd.c
+++ b/src/tmpfiles/offline-passwd.c
@@ -35,7 +35,7 @@ static int open_passwd_file(const char *root, const char *fname, FILE **ret_file
}
static int populate_uid_cache(const char *root, Hashmap **ret) {
- _cleanup_(hashmap_freep) Hashmap *cache = NULL;
+ _cleanup_hashmap_free_ Hashmap *cache = NULL;
int r;
cache = hashmap_new(&uid_gid_hash_ops);
@@ -76,7 +76,7 @@ static int populate_uid_cache(const char *root, Hashmap **ret) {
}
static int populate_gid_cache(const char *root, Hashmap **ret) {
- _cleanup_(hashmap_freep) Hashmap *cache = NULL;
+ _cleanup_hashmap_free_ Hashmap *cache = NULL;
int r;
cache = hashmap_new(&uid_gid_hash_ops);
diff --git a/src/tmpfiles/test-offline-passwd.c b/src/tmpfiles/test-offline-passwd.c
index b70cef4753..ef49582510 100644
--- a/src/tmpfiles/test-offline-passwd.c
+++ b/src/tmpfiles/test-offline-passwd.c
@@ -17,7 +17,7 @@ static void test_resolve_one(const char *name) {
log_info("/* %s(\"%s\") */", __func__, name);
- _cleanup_(hashmap_freep) Hashmap *uid_cache = NULL, *gid_cache = NULL;
+ _cleanup_hashmap_free_ Hashmap *uid_cache = NULL, *gid_cache = NULL;
uid_t uid = UID_INVALID;
gid_t gid = GID_INVALID;
int r;
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 1cb8f06b3e..af1b904d32 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -4055,7 +4055,7 @@ static int read_config_file(
bool ignore_enoent,
bool *invalid_config) {
- _cleanup_(hashmap_freep) Hashmap *uid_cache = NULL, *gid_cache = NULL;
+ _cleanup_hashmap_free_ Hashmap *uid_cache = NULL, *gid_cache = NULL;
_cleanup_fclose_ FILE *_f = NULL;
_cleanup_free_ char *pp = NULL;
unsigned v = 0;