mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 10:25:37 +03:00
cgtop: fix assert when not on tty
systemd-cgtop --dept=1 -b -n 10 -d 0.1 | cat Assertion 'new_length >= 3' failed at src/shared/util.c:3 \ 595, function ellipsize_mem(). Aborting. Aborted (core dumped) (David: add comment)
This commit is contained in:
parent
f5b51ea7fc
commit
510c4a0f1e
@ -447,7 +447,7 @@ static int display(Hashmap *a) {
|
||||
Group *g;
|
||||
Group **array;
|
||||
signed path_columns;
|
||||
unsigned rows, n = 0, j, maxtcpu = 0, maxtpath = 0;
|
||||
unsigned rows, n = 0, j, maxtcpu = 0, maxtpath = 3; /* 3 for ellipsize() to work properly */
|
||||
char buffer[MAX3(21, FORMAT_BYTES_MAX, FORMAT_TIMESPAN_MAX)];
|
||||
|
||||
assert(a);
|
||||
|
Loading…
Reference in New Issue
Block a user