From d44233503f29ad6f79914c8e6137fc2d260d9f89 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Mon, 25 Mar 2024 23:11:27 +0800 Subject: [PATCH] journalctl: explicitly check < 0 for error --- src/journal/journalctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 15f3f0e025d..898e08774a2 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -344,7 +344,7 @@ static int help_facilities(void) { for (int i = 0; i < LOG_NFACILITIES; i++) { _cleanup_free_ char *t = NULL; - if (log_facility_unshifted_to_string_alloc(i, &t)) + if (log_facility_unshifted_to_string_alloc(i, &t) < 0) return log_oom(); puts(t); } -- 2.47.3