summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-22 20:03:58 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-22 20:03:58 -0500
commitda41abc52ca1f5965a22cc481a720328b987b335 (patch)
treeef1a2ddeac3f2672a1ebc6219fa9a7cac6fa6bea /src
parent9ba762cdd7a5e1293b1d0b79a26839d83a3fd777 (diff)
cgroup-show: remove duplicated check
After 3637713a20 it is not necessary anymore.
Diffstat (limited to 'src')
-rw-r--r--src/shared/cgroup-show.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/shared/cgroup-show.c b/src/shared/cgroup-show.c
index d1132779aa..ea66c76724 100644
--- a/src/shared/cgroup-show.c
+++ b/src/shared/cgroup-show.c
@@ -43,7 +43,7 @@ static int compare(const void *a, const void *b) {
static void show_pid_array(pid_t pids[], unsigned n_pids, const char *prefix, unsigned n_columns, bool extra, bool more, bool kernel_threads, OutputFlags flags) {
unsigned i, j, pid_width;
- if (n_pids <= 0)
+ if (n_pids == 0)
return;
qsort(pids, n_pids, sizeof(pid_t), compare);
@@ -113,8 +113,7 @@ static int show_cgroup_one_by_path(const char *path, const char *prefix, unsigne
if (r < 0)
return r;
- if (n > 0)
- show_pid_array(pids, n, prefix, n_columns, false, more, kernel_threads, flags);
+ show_pid_array(pids, n, prefix, n_columns, false, more, kernel_threads, flags);
return 0;
}