From 9a0abfa8aadc9fb053f7701efbc0fa44d051da27 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 1 Jun 2018 17:55:50 +0200 Subject: [PATCH] systemctl: load_error is a string, don't compare it with 0 Using isempty() is nicer anyway. --- src/systemctl/systemctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) &&