]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/bpf-restrict-fs: use DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME macro
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 Jul 2026 17:13:58 +0000 (02:13 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 Jul 2026 18:23:40 +0000 (03:23 +0900)
src/core/bpf-restrict-fs.c

index f435469c30d666c33e335c9a87a72f0ca928b865..04b30519f4f8d1962cf72a7e4a65dc26f5021f48 100644 (file)
 
 #define CGROUP_HASH_SIZE_MAX 2048
 
-static struct restrict_fs_bpf *restrict_fs_bpf_free(struct restrict_fs_bpf *obj) {
-        /* restrict_fs_bpf__destroy handles object == NULL case */
-        restrict_fs_bpf__destroy(obj);
-
-        return NULL;
-}
-
-DEFINE_TRIVIAL_CLEANUP_FUNC(struct restrict_fs_bpf *, restrict_fs_bpf_free);
+/* restrict_fs_bpf__destroy handles object == NULL case */
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct restrict_fs_bpf *, restrict_fs_bpf__destroy, restrict_fs_bpf_freep, NULL);
 
 int bpf_restrict_fs_setup(Manager *m) {
         int r;