From 853bd5cc72a0d4cbdd07cc3cabc65bef333a0c71 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 9 Oct 2014 22:51:35 -0400 Subject: sd-journal: change check to assert As of 0f99f74a14 'sd-journal: verify that object start with the field name' this condition should never happen. --- src/journal/journalctl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/journal/journalctl.c') diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index feb53bd203..7f4bc3229c 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -838,8 +838,7 @@ static int list_boots(sd_journal *j) { return r; SD_JOURNAL_FOREACH_UNIQUE(j, data, length) { - if (length < strlen("_BOOT_ID=")) - continue; + assert(startswith(data, "_BOOT_ID=")); if (!GREEDY_REALLOC(all_ids, allocated, count + 1)) return log_oom(); -- cgit v1.2.3-54-g00ecf