diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-11 19:33:13 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-10-13 17:56:54 -0400 |
commit | 7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 (patch) | |
tree | 37a98cdb42d8b62b56aeb6fad7fd00299449d38d /src/cgtop | |
parent | fb1316462952d17d6ebf19c3f093b730c13016a7 (diff) |
Never call qsort on potentially NULL arrays
This extends 62678ded 'efi: never call qsort on potentially
NULL arrays' to all other places where qsort is used and it
is not obvious that the count is non-zero.
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 cacf705a0a..293a2113bd 100644 --- a/src/cgtop/cgtop.c +++ b/src/cgtop/cgtop.c @@ -461,7 +461,7 @@ static int display(Hashmap *a) { if (g->n_tasks_valid || g->cpu_valid || g->memory_valid || g->io_valid) array[n++] = g; - qsort(array, n, sizeof(Group*), group_compare); + qsort_safe(array, n, sizeof(Group*), group_compare); /* Find the longest names in one run */ for (j = 0; j < n; j++) { |