systemd/0562-sd-journal-change-check-to-assert.patch
Zbigniew Jędrzejewski-Szmek f1004dc2ae Update to latest git
2014-10-10 14:56:53 -04:00

26 lines
994 B
Diff

From 853bd5cc72a0d4cbdd07cc3cabc65bef333a0c71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Thu, 9 Oct 2014 22:51:35 -0400
Subject: [PATCH] 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(-)
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();