summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/coredumpctl.c2
-rw-r--r--src/journal/journal-internal.h3
-rw-r--r--src/journal/journalctl.c10
-rw-r--r--src/journal/test-journal-enum.c2
-rw-r--r--src/journal/test-journal-match.c2
-rw-r--r--src/journal/test-journal-stream.c2
6 files changed, 9 insertions, 12 deletions
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 1df28d774a..40ffa6afbe 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -792,7 +792,7 @@ finish:
}
int main(int argc, char *argv[]) {
- _cleanup_journal_close_ sd_journal*j = NULL;
+ _cleanup_(sd_journal_closep) sd_journal*j = NULL;
const char* match;
Iterator it;
int r = 0;
diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h
index c3e75ad240..9ff4fea7fb 100644
--- a/src/journal/journal-internal.h
+++ b/src/journal/journal-internal.h
@@ -127,8 +127,5 @@ struct sd_journal {
char *journal_make_match_string(sd_journal *j);
void journal_print_header(sd_journal *j);
-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; )
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index d9a8063d31..d009b2e93b 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1766,8 +1766,8 @@ static int access_check(sd_journal *j) {
}
static int flush_to_var(void) {
- _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
- _cleanup_bus_flush_close_unref_ sd_bus *bus = NULL;
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
+ _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_close_ int watch_fd = -1;
int r;
@@ -1828,7 +1828,7 @@ static int flush_to_var(void) {
}
static int send_signal_and_wait(int sig, const char *watch_path) {
- _cleanup_bus_flush_close_unref_ sd_bus *bus = NULL;
+ _cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_close_ int watch_fd = -1;
usec_t start;
int r;
@@ -1857,7 +1857,7 @@ static int send_signal_and_wait(int sig, const char *watch_path) {
/* Let's ask for a sync, but only once. */
if (!bus) {
- _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+ _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
r = bus_connect_system_systemd(&bus);
if (r < 0)
@@ -1920,7 +1920,7 @@ static int sync_journal(void) {
int main(int argc, char *argv[]) {
int r;
- _cleanup_journal_close_ sd_journal *j = NULL;
+ _cleanup_(sd_journal_closep) sd_journal *j = NULL;
bool need_seek = false;
sd_id128_t previous_boot_id;
bool previous_boot_id_valid = false, first_line = true;
diff --git a/src/journal/test-journal-enum.c b/src/journal/test-journal-enum.c
index 8f56ea1907..d396fabdab 100644
--- a/src/journal/test-journal-enum.c
+++ b/src/journal/test-journal-enum.c
@@ -29,7 +29,7 @@
int main(int argc, char *argv[]) {
unsigned n = 0;
- _cleanup_journal_close_ sd_journal*j = NULL;
+ _cleanup_(sd_journal_closep) sd_journal*j = NULL;
log_set_max_level(LOG_DEBUG);
diff --git a/src/journal/test-journal-match.c b/src/journal/test-journal-match.c
index abefedb992..4ebaa8b31a 100644
--- a/src/journal/test-journal-match.c
+++ b/src/journal/test-journal-match.c
@@ -30,7 +30,7 @@
#include "util.h"
int main(int argc, char *argv[]) {
- _cleanup_journal_close_ sd_journal*j;
+ _cleanup_(sd_journal_closep) sd_journal*j = NULL;
_cleanup_free_ char *t;
log_set_max_level(LOG_DEBUG);
diff --git a/src/journal/test-journal-stream.c b/src/journal/test-journal-stream.c
index 0cbef4b8c5..2c257e43b6 100644
--- a/src/journal/test-journal-stream.c
+++ b/src/journal/test-journal-stream.c
@@ -79,7 +79,7 @@ int main(int argc, char *argv[]) {
JournalFile *one, *two, *three;
char t[] = "/tmp/journal-stream-XXXXXX";
unsigned i;
- _cleanup_journal_close_ sd_journal *j = NULL;
+ _cleanup_(sd_journal_closep) sd_journal *j = NULL;
char *z;
const void *data;
size_t l;