summaryrefslogtreecommitdiff
path: root/src/shared/cgroup-show.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/cgroup-show.c')
-rw-r--r--src/shared/cgroup-show.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
index e971f36190..cc44ab4ea9 100644
--- a/src/shared/cgroup-show.c
+++ b/src/shared/cgroup-show.c
@@ -44,6 +44,8 @@ static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsi
unsigned i, m, pid_width;
pid_t biggest = 0;
+ assert(n_pids > 0);
+
/* Filter duplicates */
m = 0;
for (i = 0; i < n_pids; i++) {