From: Mike Yuan Date: Mon, 25 Mar 2024 15:11:27 +0000 (+0800) Subject: journalctl: explicitly check < 0 for error X-Git-Tag: v256-rc1~414^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F31938%2Fhead;p=thirdparty%2Fsystemd.git journalctl: explicitly check < 0 for error --- 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); }