From 5cfee41459d54e13fd61238a0440cd4453421ed6 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 25 Sep 2015 13:36:54 +0200 Subject: tree-wide: use strempty() where possible Also add a Coccinell patch to detect such locations in the future. --- src/systemctl/systemctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/systemctl') 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) -- cgit v1.2.3-54-g00ecf