summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2016-01-26 18:16:48 +0100
committerTom Gundersen <teg@jklm.no>2016-01-26 18:16:48 +0100
commit9766c16bd08bd6714064ee950798a6db0874b048 (patch)
tree972cb76059dce82a6ded31fc32d0cb15b4e35b1e /src/journal/journald-server.c
parentcfd77192c1de3bd264d15d6f4d8b3117f5619f4f (diff)
parente167d7fd8d5fe918b6d675e16aeca2c43398a5b2 (diff)
Merge pull request #2440 from poettering/journal-fix
journald: minor fixes
Diffstat (limited to 'src/journal/journald-server.c')
-rw-r--r--src/journal/journald-server.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index fd802b4461..8ff7ef943b 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -247,25 +247,26 @@ static int open_journal(
JournalFile *template,
JournalFile **ret) {
int r;
+ JournalFile *f;
assert(s);
assert(fname);
assert(ret);
if (reliably)
- r = journal_file_open_reliably(fname, flags, 0640, s->compress, seal, metrics, s->mmap, template, ret);
+ r = journal_file_open_reliably(fname, flags, 0640, s->compress, seal, metrics, s->mmap, template, &f);
else
- r = journal_file_open(fname, flags, 0640, s->compress, seal, metrics, s->mmap, template, ret);
-
+ r = journal_file_open(fname, flags, 0640, s->compress, seal, metrics, s->mmap, template, &f);
if (r < 0)
return r;
- r = journal_file_enable_post_change_timer(*ret, s->event, POST_CHANGE_TIMER_INTERVAL_USEC);
+ r = journal_file_enable_post_change_timer(f, s->event, POST_CHANGE_TIMER_INTERVAL_USEC);
if (r < 0) {
- *ret = journal_file_close(*ret);
+ journal_file_close(f);
return r;
}
+ *ret = f;
return r;
}