From f9281a6e9b80c63512e38304b6ec2e05c4f2acba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Georg=20M=C3=BCller?= <georgmueller@gmx.net>
Date: Thu, 12 Mar 2020 20:02:21 +0100
Subject: [PATCH] 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.
Reference: https://github.com/systemd/systemd/commit/f9281a6e9b80c63512e38304b6ec2e05c4f2acba
Conflict: NA
---
 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 72b7613..42056b5 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -443,7 +443,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));
 
-- 
2.23.0

