diff options
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -93,16 +93,6 @@ static inline void* zmalloc(size_t size) } \ struct __useless_struct_to_allow_trailing_semicolon__ - -static inline void sd_bus_close_unrefp(sd_bus **bus) { - if (*bus) { - sd_bus_flush(*bus); - sd_bus_close(*bus); - sd_bus_unref(*bus); - } -} -#define _cleanup_bus_close_unref_ _cleanup_(sd_bus_close_unrefp) - static inline unsigned strv_length(char **strv) { @@ -139,16 +129,12 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(FILE *, fclose); DEFINE_TRIVIAL_CLEANUP_FUNC(DIR *, closedir); #define _cleanup_closedir_ _cleanup_(closedirp) -DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus *, sd_bus_unref); -#define _cleanup_bus_unref_ _cleanup_(sd_bus_unrefp) +#define _cleanup_bus_flush_close_unref_ _cleanup_(sd_bus_flush_close_unrefp) -DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_slot *, sd_bus_slot_unref); #define _cleanup_bus_slot_unref_ _cleanup_(sd_bus_slot_unrefp) -DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message *, sd_bus_message_unref); #define _cleanup_bus_message_unref_ _cleanup_(sd_bus_message_unrefp) -DEFINE_TRIVIAL_CLEANUP_FUNC(sd_event_source *, sd_event_source_unref); #define _cleanup_event_source_unref_ _cleanup_(sd_event_source_unrefp) #endif |