From: Lennart Poettering Date: Fri, 1 Jun 2018 15:55:50 +0000 (+0200) Subject: systemctl: load_error is a string, don't compare it with 0 X-Git-Tag: v239~99^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a0abfa8aadc9fb053f7701efbc0fa44d051da27;p=thirdparty%2Fsystemd.git systemctl: load_error is a string, don't compare it with 0 Using isempty() is nicer anyway. --- diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index d5ed5c2e2aa..edb55d9ffce 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) &&