diff options
author | Daniel Mack <daniel@zonque.org> | 2015-09-25 13:36:54 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-09-30 11:41:03 +0200 |
commit | 5cfee41459d54e13fd61238a0440cd4453421ed6 (patch) | |
tree | 1635065a8f9d9c0950aabef6fe37a50b91fb4494 /src/systemctl | |
parent | 2ea69f8d5e4a83397c5050914adf6452cafa9559 (diff) |
tree-wide: use strempty() where possible
Also add a Coccinell patch to detect such locations in the future.
Diffstat (limited to 'src/systemctl')
-rw-r--r-- | src/systemctl/systemctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index e0a69867d2..9718ef54df 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3524,7 +3524,7 @@ static void print_status_info( printf("Condition: start %scondition failed%s at %s%s%s\n", ansi_highlight_yellow(), ansi_normal(), - s2, s1 ? "; " : "", s1 ? s1 : ""); + s2, s1 ? "; " : "", strempty(s1)); if (i->failed_condition_trigger) printf(" none of the trigger conditions were met\n"); else if (i->failed_condition) @@ -3540,7 +3540,7 @@ static void print_status_info( printf(" Assert: start %sassertion failed%s at %s%s%s\n", ansi_highlight_red(), ansi_normal(), - s2, s1 ? "; " : "", s1 ? s1 : ""); + s2, s1 ? "; " : "", strempty(s1)); if (i->failed_assert_trigger) printf(" none of the trigger assertions were met\n"); else if (i->failed_assert) |