From: Georg Müller Date: Thu, 12 Mar 2020 19:02:21 +0000 (+0100) Subject: fix journalctl regression (#15099) X-Git-Tag: v245.2~4 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=e8df08cfdb20e31066559c53420d7fd56b31ec01;p=systemd%2F.git fix journalctl regression (#15099) This regression was introduced in #14913. The current_file variable can be NULL, as, for example, with the following commands: * journalctl --list-boots * journalctl -b -1 --no-pager Since current_file is only checked for pointer equality with f, removing the assertion is safe here. (cherry picked from commit 8d0726fcd7b72f2a6f75dd731cbf7c8d4df107ef) --- diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 17998090f4..56a6a9c431 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -440,7 +440,6 @@ _pure_ static int compare_with_location(const JournalFile *f, const Location *l, assert(f); assert(l); - assert(current_file); assert(f->location_type == LOCATION_SEEK); assert(IN_SET(l->type, LOCATION_DISCRETE, LOCATION_SEEK));