]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fix journalctl regression (#15099)
authorGeorg Müller <georgmueller@gmx.net>
Thu, 12 Mar 2020 19:02:21 +0000 (20:02 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 13 Mar 2020 03:31:01 +0000 (12:31 +0900)
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.

src/journal/sd-journal.c

index 17998090f431a744de45ef3203ad7f581bb454aa..56a6a9c431f9f8072d1fdd50edde1d3ac0c594c3 100644 (file)
@@ -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));