diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-17 23:36:25 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-03-18 19:49:30 -0400 |
commit | 763c7aa288485cf5ab627fe1d25ff58e76f9dacb (patch) | |
tree | 563130863f8763af93df272c0122c76ef25aaba0 /src/journal/test-journal-enum.c | |
parent | a50d7d4389217c0d3b527ee260eabf89e4a76caa (diff) |
journal,shared: add _cleanup_journal_close_
Diffstat (limited to 'src/journal/test-journal-enum.c')
-rw-r--r-- | src/journal/test-journal-enum.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/test-journal-enum.c b/src/journal/test-journal-enum.c index 8a843ecdda..88f583e6c7 100644 --- a/src/journal/test-journal-enum.c +++ b/src/journal/test-journal-enum.c @@ -23,10 +23,12 @@ #include "log.h" #include "sd-journal.h" +#include "macro.h" +#include "util.h" int main(int argc, char *argv[]) { unsigned n = 0; - sd_journal *j; + sd_journal _cleanup_journal_close_ *j = NULL; log_set_max_level(LOG_DEBUG); @@ -48,6 +50,5 @@ int main(int argc, char *argv[]) { break; } - sd_journal_close(j); return 0; } |