summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-15 19:27:37 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-15 19:27:37 +0100
commit43479f8d21a770cdb4870087fcec446b3d845cbc (patch)
tree6184285aca838ce3cf6f26310a0632f807f96b26 /src/systemctl/systemctl.c
parentprocess-util: rename char *r to ans and add comment (diff)
downloadsystemd-43479f8d21a770cdb4870087fcec446b3d845cbc.tar.xz
systemd-43479f8d21a770cdb4870087fcec446b3d845cbc.zip
systemctl: uninitalized variable
CID #1368270. Easily reproduced with COLUMNS=50 ./systemctl --no-pager.
Diffstat (limited to '')
-rw-r--r--src/systemctl/systemctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 8955d5f51f..9c0ee37520 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -472,7 +472,8 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) {
id_len += incr;
desc_len += MIN(extra_len - incr, max_desc_len - desc_len);
}
- }
+ } else
+ desc_len = 0;
} else {
id_len = max_id_len;
desc_len = max_desc_len;