summaryrefslogtreecommitdiffstats
path: root/src/journal/journalctl.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-25 16:11:27 +0100
committerMike Yuan <me@yhndnzj.com>2024-03-25 16:11:27 +0100
commitd44233503f29ad6f79914c8e6137fc2d260d9f89 (patch)
tree8d66e9b834fe309f21a6543e23d1c8da750a4568 /src/journal/journalctl.c
parentbasic/string-table: remove unnecessary brackets (diff)
downloadsystemd-d44233503f29ad6f79914c8e6137fc2d260d9f89.tar.xz
systemd-d44233503f29ad6f79914c8e6137fc2d260d9f89.zip
journalctl: explicitly check < 0 for error
Diffstat (limited to '')
-rw-r--r--src/journal/journalctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 15f3f0e025..898e08774a 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);
}