From 0600ff0e66f844ade3fe4e44c54dc05e67c28026 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 23 Apr 2020 11:53:51 +0200 Subject: [PATCH] journal: don't assert on mmap'ed object type Mappings canbe replaced by all zeroes under our feet if vacuuming decides to unallocate some file. Hence let's not check for this kind of stuff in an assert. (Typically, we should genreate runtime errors in this case, in particular EBADMSG, which the callers generally look for. But in this case this is just an extra precaution check anyway, so let's just remove it.) --- src/journal/sd-journal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 720ec361452..ca80eb2f1c6 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -119,7 +119,6 @@ static void init_location(Location *l, LocationType type, JournalFile *f, Object assert(l); assert(IN_SET(type, LOCATION_DISCRETE, LOCATION_SEEK)); assert(f); - assert(o->object.type == OBJECT_ENTRY); *l = (Location) { .type = type, -- 2.47.3