mirror of
https://github.com/systemd/systemd.git
synced 2024-12-01 06:13:38 +08:00
systemctl: load_error is a string, don't compare it with 0
Using isempty() is nicer anyway.
This commit is contained in:
parent
c4555ad8f6
commit
9a0abfa8aa
@ -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) &&
|
||||
|
Loading…
Reference in New Issue
Block a user