diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-04-27 14:28:35 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-04-27 14:29:06 +0200 |
commit | cf409d15fa78275e2606c4c53b550198ab5ef5c1 (patch) | |
tree | 7948a8f8e5395a71fce868370ab87434d41929ef /src/cgtop | |
parent | 1232c44718b04024d1cccecb5c0ae75c311eaea3 (diff) | |
download | systemd-cf409d15fa78275e2606c4c53b550198ab5ef5c1.tar.gz |
tree-wide: use newa() rather than alloca() where we can
Diffstat (limited to 'src/cgtop')
-rw-r--r-- | src/cgtop/cgtop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c index de5083bdde..de7ecf54cd 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -627,7 +627,7 @@ static void display(Hashmap *a) { if (!terminal_is_dumb()) fputs(ANSI_HOME_CLEAR, stdout); - array = alloca(sizeof(Group*) * hashmap_size(a)); + array = newa(Group*, hashmap_size(a)); HASHMAP_FOREACH(g, a, i) if (g->n_tasks_valid || g->cpu_valid || g->memory_valid || g->io_valid) |