summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-01 17:55:50 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-11 12:53:12 +0200
commit9a0abfa8aadc9fb053f7701efbc0fa44d051da27 (patch)
treefc1578964f49ef0b501d395c3714e8c50a0cdb47
parentcore: introduce a new load state "bad-setting" (diff)
downloadsystemd-9a0abfa8aadc9fb053f7701efbc0fa44d051da27.tar.xz
systemd-9a0abfa8aadc9fb053f7701efbc0fa44d051da27.zip
systemctl: load_error is a string, don't compare it with 0
Using isempty() is nicer anyway.
-rw-r--r--src/systemctl/systemctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d5ed5c2e2a..edb55d9ffc 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3988,7 +3988,7 @@ static void print_status_info(
if (path && terminal_urlify_path(path, NULL, &formatted_path) >= 0)
path = formatted_path;
- if (i->load_error != 0)
+ if (!isempty(i->load_error))
printf(" Loaded: %s%s%s (Reason: %s)\n",
on, strna(i->load_state), off, i->load_error);
else if (path && !isempty(i->unit_file_state) && !isempty(i->unit_file_preset) &&