]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: fix minor coding style issue 17603/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 14 Nov 2020 00:06:35 +0000 (09:06 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 14 Nov 2020 00:06:35 +0000 (09:06 +0900)
src/systemctl/systemctl-list-units.c

index e6a530ed5b10989d14f93cb90ccb3f51ad1d0939..b747cb5a5529a32c0e8d5917f6e658bca9a0843c 100644 (file)
@@ -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 {