diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-01-15 19:27:37 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-01-15 19:27:37 +0100 |
commit | 43479f8d21a770cdb4870087fcec446b3d845cbc (patch) | |
tree | 6184285aca838ce3cf6f26310a0632f807f96b26 /src/systemctl/systemctl.c | |
parent | process-util: rename char *r to ans and add comment (diff) | |
download | systemd-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.c | 3 |
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; |