diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-04-23 12:11:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-04-23 12:13:21 +0200 |
commit | bfbd5be02ac9b02d02cc8c35027272ac3e7b9ac7 (patch) | |
tree | 95d5918cb2647bf122bff4aba601686f4aa80152 /src/journal/journal-file.c | |
parent | journal: make sure to explicitly copy out values of mmap before doing arithme... (diff) | |
download | systemd-bfbd5be02ac9b02d02cc8c35027272ac3e7b9ac7.tar.xz systemd-bfbd5be02ac9b02d02cc8c35027272ac3e7b9ac7.zip |
journal: no need to check offset twice, journal_file_move_to_object() does it again
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r-- | src/journal/journal-file.c | 4 |
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; |