]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: no need to check offset twice, journal_file_move_to_object() does it again 15557/head
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Apr 2020 10:11:15 +0000 (12:11 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Apr 2020 10:13:21 +0000 (12:13 +0200)
src/journal/journal-file.c

index f481efb6d72f58d1d58b6ccd4d31975e9892283b..b1e092224f789cfa227c7fdc1d3f1f10a44ebaf3 100644 (file)
@@ -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;