summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-21 16:16:39 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-21 16:16:39 +0200
commit0559d3a58ac25a37b832f12fbdefef58fd351270 (patch)
tree0b42e26b1cc5fb6b63fa4ee3071ba27459b80bae
parent5d5e98eb8c859d5a85fe6cd5e3cc433bd8a096ba (diff)
journal: don't allow journal_file_open() to be called with ret being NULL
-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: