summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-02 22:36:33 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-02 22:36:33 +0200
commit804ae586d475d77946debb22c1bc9ee049d4750c (patch)
treef70f836266c14d6c56fd6ecab018a0bd40f498f8 /src/journal/journald-server.c
parent2e14c544a9c13c516f6918618138b38e0f6c7a17 (diff)
journal: make journal_file_close() return NULL
The way it is customary everywhere else in our sources.
Diffstat (limited to 'src/journal/journald-server.c')
-rw-r--r--src/journal/journald-server.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 4566612949..50e9b08da9 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1091,11 +1091,12 @@ int server_flush_to_var(Server *s) {
}
}
+ r = 0;
+
finish:
journal_file_post_change(s->system_journal);
- journal_file_close(s->runtime_journal);
- s->runtime_journal = NULL;
+ s->runtime_journal = journal_file_close(s->runtime_journal);
if (r >= 0)
(void) rm_rf("/run/log/journal", REMOVE_ROOT);
@@ -1340,8 +1341,8 @@ static int server_parse_proc_cmdline(Server *s) {
} else if (startswith(word, "systemd.journald"))
log_warning("Invalid systemd.journald parameter. Ignoring.");
}
- /* do not warn about state here, since probably systemd already did */
+ /* do not warn about state here, since probably systemd already did */
return 0;
}
@@ -1616,11 +1617,7 @@ int server_init(Server *s) {
server_cache_boot_id(s);
server_cache_machine_id(s);
- r = system_journal_open(s, false);
- if (r < 0)
- return r;
-
- return 0;
+ return system_journal_open(s, false);
}
void server_maybe_append_tags(Server *s) {