From bfbd5be02ac9b02d02cc8c35027272ac3e7b9ac7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 23 Apr 2020 12:11:15 +0200 Subject: journal: no need to check offset twice, journal_file_move_to_object() does it again --- src/journal/journal-file.c | 4 +--- 1 file changed, 1 insertion(+), 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; -- cgit v1.2.1