summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-23 12:11:15 +0200
committerLennart Poettering <lennart@poettering.net>2020-04-23 12:13:21 +0200
commitbfbd5be02ac9b02d02cc8c35027272ac3e7b9ac7 (patch)
tree95d5918cb2647bf122bff4aba601686f4aa80152
parent893e0f8fb670caff2f5717683902be08bd449f39 (diff)
downloadsystemd-bfbd5be02ac9b02d02cc8c35027272ac3e7b9ac7.tar.gz
journal: no need to check offset twice, journal_file_move_to_object() does it again
-rw-r--r--src/journal/journal-file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index f481efb6d7..b1e092224f 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1768,14 +1768,12 @@ static int link_entry_into_array_plus_one(JournalFile *f,
static int journal_file_link_entry_item(JournalFile *f, Object *o, uint64_t offset, uint64_t i) {
uint64_t p;
int r;
+
assert(f);
assert(o);
assert(offset > 0);
p = le64toh(o->entry.items[i].object_offset);
- if (p == 0)
- return -EINVAL;
-
r = journal_file_move_to_object(f, OBJECT_DATA, p, &o);
if (r < 0)
return r;