]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: load_error is a string, don't compare it with 0
authorLennart Poettering <lennart@poettering.net>
Fri, 1 Jun 2018 15:55:50 +0000 (17:55 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Jun 2018 10:53:12 +0000 (12:53 +0200)
Using isempty() is nicer anyway.

src/systemctl/systemctl.c

index d5ed5c2e2aaa8e44cbe00e5d1a9c5358d345c74f..edb55d9ffced155aa39f7930b420b3c638111b37 100644 (file)
@@ -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) &&