]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
libarchive-util: drop 'sym_' prefix from cleanup functions
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Oct 2025 02:23:20 +0000 (11:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Oct 2025 02:25:19 +0000 (11:25 +0900)
src/dissect/dissect.c
src/shared/libarchive-util.h
src/shared/tar-util.c

index ca69b36c22849f7b0bd110ac6c1f40d4bb636fb5..51b2ac40bc6496deecf242c0476cda700809db53 100644 (file)
@@ -1455,7 +1455,7 @@ static int archive_item(
 
         log_debug("Archiving %s\n", path);
 
-        _cleanup_(sym_archive_entry_freep) struct archive_entry *entry = NULL;
+        _cleanup_(archive_entry_freep) struct archive_entry *entry = NULL;
         entry = sym_archive_entry_new();
         if (!entry)
                 return log_oom();
@@ -1744,7 +1744,7 @@ static int action_list_or_mtree_or_copy_or_make_archive(DissectedImage *m, LoopD
                 if (dfd < 0)
                         return log_error_errno(errno, "Failed to open mount directory: %m");
 
-                _cleanup_(sym_archive_write_freep) struct archive *a = sym_archive_write_new();
+                _cleanup_(archive_write_freep) struct archive *a = sym_archive_write_new();
                 if (!a)
                         return log_oom();
 
index 7d4ba3b6ba9dfcff5d370f882237da6367edac59..83ee19d27a5ef3cb0e71fb6204883c7ad68d433a 100644 (file)
@@ -77,9 +77,9 @@ static inline int sym_archive_entry_hardlink_is_set(struct archive_entry *e) {
 
 int dlopen_libarchive(void);
 
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive_entry*, sym_archive_entry_free, NULL);
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive*, sym_archive_write_free, NULL);
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(struct archive*, sym_archive_read_free, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct archive_entry*, sym_archive_entry_free, archive_entry_freep, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct archive*, sym_archive_write_free, archive_write_freep, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct archive*, sym_archive_read_free, archive_read_freep, NULL);
 
 #else
 
index 6eb3a2baadbdc3e88ea3f71b79c3a5baad95cb45..135ff28a11465a7e0d484a45facc6ba4c199fc9c 100644 (file)
@@ -392,7 +392,7 @@ int tar_x(int input_fd, int tree_fd, TarFlags flags) {
         assert(input_fd >= 0);
         assert(tree_fd >= 0);
 
-        _cleanup_(sym_archive_read_freep) struct archive *a = NULL;
+        _cleanup_(archive_read_freep) struct archive *a = NULL;
         a = sym_archive_read_new();
         if (!a)
                 return log_oom();