From 3312a94ff4152154a59dd77316e29c24e3a779ec Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 27 Jun 2019 14:43:36 +0200 Subject: [PATCH] cgroups: simplify cgfsng_nrtasks() Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 7971cea60..4205298b5 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1898,14 +1898,12 @@ static int recursive_count_nrtasks(char *dirname) __cgfsng_ops static int cgfsng_nrtasks(struct cgroup_ops *ops) { __do_free char *path = NULL; - int count; if (!ops->container_cgroup || !ops->hierarchies) return -1; path = must_make_path(ops->hierarchies[0]->container_full_path, NULL); - count = recursive_count_nrtasks(path); - return count; + return recursive_count_nrtasks(path); } /* Only root needs to escape to the cgroup of its init. */