diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-12 20:28:21 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-13 17:56:55 -0400 |
commit | 1ca208fb4f93e5869704af1812cbff7130a2fc03 (patch) | |
tree | 689343b99c76e4d34c625197762de97e8435571d /src/journal | |
parent | b506291ff195e03ce793ac925cc2d158f0b452b5 (diff) |
Introduce udev object cleanup functions
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journal-internal.h | 7 |
1 files changed, 2 insertions, 5 deletions
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; ) |