diff options
Diffstat (limited to 'src/systemd/_sd-common.h')
-rw-r--r-- | src/systemd/_sd-common.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h index 896a027eb5..18765bff32 100644 --- a/src/systemd/_sd-common.h +++ b/src/systemd/_sd-common.h @@ -75,4 +75,11 @@ # endif #endif +#define _SD_DEFINE_POINTER_CLEANUP_FUNC(type, func) \ + static inline void func##p(type **p) { \ + if (*p) \ + func(*p); \ + } \ + struct __useless_struct_to_allow_trailing_semicolon__ + #endif |