From 1ca208fb4f93e5869704af1812cbff7130a2fc03 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 12 Oct 2013 20:28:21 -0400 Subject: Introduce udev object cleanup functions --- src/journal/journal-internal.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/journal') diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h index 5bc653537c..1bc912c977 100644 --- a/src/journal/journal-internal.h +++ b/src/journal/journal-internal.h @@ -135,11 +135,8 @@ struct sd_journal { char *journal_make_match_string(sd_journal *j); void journal_print_header(sd_journal *j); -static inline void journal_closep(sd_journal **j) { - sd_journal_close(*j); -} - -#define _cleanup_journal_close_ _cleanup_(journal_closep) +define_trivial_cleanup_func(sd_journal*, sd_journal_close) +#define _cleanup_journal_close_ _cleanup_(sd_journal_closep) #define JOURNAL_FOREACH_DATA_RETVAL(j, data, l, retval) \ for (sd_journal_restart_data(j); ((retval) = sd_journal_enumerate_data((j), &(data), &(l))) > 0; ) -- cgit v1.2.3-54-g00ecf