shared/cgroup-show: fix off-by-one in column counting

We'd get one column too many, and the trailing ellipsis would end up in
the next row.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-05-21 10:57:23 +02:00
parent 9743846e23
commit 31c294dc41
+2 -2
View File
@@ -53,8 +53,8 @@ static void show_pid_array(
if (flags & OUTPUT_FULL_WIDTH)
n_columns = 0;
else {
if (n_columns > pid_width+2)
n_columns -= pid_width+2;
if (n_columns > pid_width + 3) /* something like "├─1114784 " */
n_columns -= pid_width + 3;
else
n_columns = 20;
}