]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl: explicitly check < 0 for error 31938/head
authorMike Yuan <me@yhndnzj.com>
Mon, 25 Mar 2024 15:11:27 +0000 (23:11 +0800)
committerMike Yuan <me@yhndnzj.com>
Mon, 25 Mar 2024 15:11:27 +0000 (23:11 +0800)
src/journal/journalctl.c

index 15f3f0e025dad71eb6c4c550f7c58982f3c076e8..898e08774a26ab8922110a4c61345a838e894ddd 100644 (file)
@@ -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);
         }