summaryrefslogtreecommitdiff
path: root/src/journal/journal-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journal-internal.h')
-rw-r--r--src/journal/journal-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h
index 3accf14c05..ff8b34a951 100644
--- a/src/journal/journal-internal.h
+++ b/src/journal/journal-internal.h
@@ -132,3 +132,9 @@ 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)