From: Vito Caputo Date: Tue, 7 Dec 2021 22:16:28 +0000 (-0800) Subject: mmap-cache: add MMapCache trivial cleanup helpers X-Git-Tag: v250-rc1~27^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=333d0672625b0b466f9d1d7b46e452105ec13a2b;p=thirdparty%2Fsystemd.git mmap-cache: add MMapCache trivial cleanup helpers Enable _cleanup_(mmap_cache_unrefp) style cleanup for MMapCache* --- diff --git a/src/libsystemd/sd-journal/mmap-cache.h b/src/libsystemd/sd-journal/mmap-cache.h index 907ebae843b..4769414ded3 100644 --- a/src/libsystemd/sd-journal/mmap-cache.h +++ b/src/libsystemd/sd-journal/mmap-cache.h @@ -13,6 +13,7 @@ typedef struct MMapFileDescriptor MMapFileDescriptor; MMapCache* mmap_cache_new(void); MMapCache* mmap_cache_ref(MMapCache *m); MMapCache* mmap_cache_unref(MMapCache *m); +DEFINE_TRIVIAL_CLEANUP_FUNC(MMapCache*, mmap_cache_unref); int mmap_cache_fd_get( MMapFileDescriptor *f,