From: Lennart Poettering Date: Thu, 23 Apr 2020 10:11:15 +0000 (+0200) Subject: journal: no need to check offset twice, journal_file_move_to_object() does it again X-Git-Tag: v246-rc1~315^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfbd5be02ac9b02d02cc8c35027272ac3e7b9ac7;p=thirdparty%2Fsystemd.git journal: no need to check offset twice, journal_file_move_to_object() does it again --- diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index f481efb6d72..b1e092224f7 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;