diff options
Diffstat (limited to 'src/shared/bus-unit-procs.c')
-rw-r--r-- | src/shared/bus-unit-procs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c index 87c0334fec..3693fd61dc 100644 --- a/src/shared/bus-unit-procs.c +++ b/src/shared/bus-unit-procs.c @@ -199,7 +199,7 @@ static int dump_processes( } if (cg->children) { - struct CGroupInfo **children, *child; + struct CGroupInfo **children; size_t n = 0, i; /* Order subcgroups by their name */ @@ -217,9 +217,7 @@ static int dump_processes( const char *name, *special; bool more; - child = children[i]; - - name = strrchr(child->cgroup_path, '/'); + name = strrchr(children[i]->cgroup_path, '/'); if (!name) return -EINVAL; name++; @@ -238,7 +236,7 @@ static int dump_processes( if (!pp) return -ENOMEM; - r = dump_processes(cgroups, child->cgroup_path, pp, n_columns, flags); + r = dump_processes(cgroups, children[i]->cgroup_path, pp, n_columns, flags); if (r < 0) return r; } |