From 43479f8d21a770cdb4870087fcec446b3d845cbc Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sun, 15 Jan 2017 13:27:37 -0500 Subject: systemctl: uninitalized variable CID #1368270. Easily reproduced with COLUMNS=50 ./systemctl --no-pager. --- src/systemctl/systemctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3-54-g00ecf