summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl-list-units.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-11-14 09:06:35 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-11-14 09:06:35 +0900
commit5ba97fc0a967e0c07f00bce605f5bdd8484d716c (patch)
treea739e8a81e8426e15a07a789e7efccd4814bf927 /src/systemctl/systemctl-list-units.c
parentca7b9e1e0a84c007d848381527d043d9447b826b (diff)
downloadsystemd-5ba97fc0a967e0c07f00bce605f5bdd8484d716c.tar.gz
systemctl: fix minor coding style issue
Diffstat (limited to 'src/systemctl/systemctl-list-units.c')
-rw-r--r--src/systemctl/systemctl-list-units.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-list-units.c b/src/systemctl/systemctl-list-units.c
index e6a530ed5b..b747cb5a55 100644
--- a/src/systemctl/systemctl-list-units.c
+++ b/src/systemctl/systemctl-list-units.c
@@ -186,7 +186,8 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
"LOAD = Reflects whether the unit definition was properly loaded.\n"
"ACTIVE = The high-level unit activation state, i.e. generalization of SUB.\n"
"SUB = The low-level unit activation state, values depend on unit type.");
- puts(job_count ? "JOB = Pending job for the unit.\n" : "");
+ if (job_count > 0)
+ puts("JOB = Pending job for the unit.\n");
on = ansi_highlight();
off = ansi_normal();
} else {