summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index e778e1c67c..6db9955aa5 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2012,6 +2012,7 @@ int journal_file_open(
bool newly_created = false;
assert(fname);
+ assert(ret);
if ((flags & O_ACCMODE) != O_RDONLY &&
(flags & O_ACCMODE) != O_RDWR)
@@ -2156,9 +2157,7 @@ int journal_file_open(
if (r < 0)
goto fail;
- if (ret)
- *ret = f;
-
+ *ret = f;
return 0;
fail: