chiark / gitweb /
Move DEFINE_TRIVIAL_CLEANUP_FUNC to macro.h
[elogind.git] / src / shared / util.h
index 5818fee82e52f48be4bdd9c1fdea8c0ee5f169a9..8a3e95a17aa11d55ed13e26e0d110264dde341c0 100644 (file)
@@ -664,13 +664,6 @@ static inline void freep(void *p) {
         free(*(void**) p);
 }
 
-#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func)                 \
-        static inline void func##p(type *p) {                   \
-                if (*p)                                         \
-                        func(*p);                               \
-        }                                                       \
-        struct __useless_struct_to_allow_trailing_semicolon__
-
 static inline void closep(int *fd) {
         safe_close(*fd);
 }