From: Zbigniew Jędrzejewski-Szmek Date: Fri, 10 Oct 2014 02:51:35 +0000 (-0400) Subject: sd-journal: change check to assert X-Git-Tag: v217~260 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;ds=sidebyside;h=853bd5cc72a0d4cbdd07cc3cabc65bef333a0c71;p=elogind.git sd-journal: change check to assert As of 0f99f74a14 'sd-journal: verify that object start with the field name' this condition should never happen. --- diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index feb53bd20..7f4bc3229 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();