systemctl: load_error is a string, don't compare it with 0

Using isempty() is nicer anyway.
This commit is contained in:
Lennart Poettering 2018-06-01 17:55:50 +02:00
parent c4555ad8f6
commit 9a0abfa8aa

View 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) &&