summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-09-25 13:36:54 +0200
committerDaniel Mack <daniel@zonque.org>2015-09-30 11:41:03 +0200
commit5cfee41459d54e13fd61238a0440cd4453421ed6 (patch)
tree1635065a8f9d9c0950aabef6fe37a50b91fb4494 /src/systemctl/systemctl.c
parent2ea69f8d5e4a83397c5050914adf6452cafa9559 (diff)
tree-wide: use strempty() where possible
Also add a Coccinell patch to detect such locations in the future.
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c4
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)