ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
572a44
From a01fee0ef04e93dbe1eecb1aa276e515114e9c1b Mon Sep 17 00:00:00 2001
572a44
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
572a44
Date: Mon, 14 Oct 2013 19:15:24 -0400
572a44
Subject: [PATCH] Fix bad assert in show_pid_array
572a44
572a44
This function should get the same treatment as other qsort uses
572a44
did in 7ff7394 "Never call qsort on potentially NULL arrays".
572a44
572a44
Reported-by: Oleksii Shevchuk <alxchk@gmail.com>
572a44
---
572a44
 src/shared/cgroup-show.c | 2 --
572a44
 1 file changed, 2 deletions(-)
572a44
572a44
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
572a44
index f6e56db..aa0f017 100644
572a44
--- a/src/shared/cgroup-show.c
572a44
+++ b/src/shared/cgroup-show.c
572a44
@@ -44,8 +44,6 @@ static void show_pid_array(int pids[], unsigned n_pids, const char *prefix, unsi
572a44
         unsigned i, m, pid_width;
572a44
         pid_t biggest = 0;
572a44
 
572a44
-        assert(n_pids > 0);
572a44
-
572a44
         /* Filter duplicates */
572a44
         m = 0;
572a44
         for (i = 0; i < n_pids; i++) {