mirror of
https://github.com/systemd/systemd.git
synced 2025-01-13 17:18:18 +03:00
cgroup-show: remove duplicated check
After 3637713a20
it is not necessary anymore.
This commit is contained in:
parent
9ba762cdd7
commit
da41abc52c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user