From 779b3d82e647c79a99e7cee42809b91e001e1024 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 27 Jun 2019 14:43:09 +0200 Subject: [PATCH] cgroups: move variable into tighter scope 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 f29ccd1bc..7971cea60 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1912,12 +1912,10 @@ __cgfsng_ops static int cgfsng_nrtasks(struct cgroup_ops *ops) __cgfsng_ops static bool cgfsng_escape(const struct cgroup_ops *ops, struct lxc_conf *conf) { - int i; - if (conf->cgroup_meta.relative || geteuid() || !ops->hierarchies) return true; - for (i = 0; ops->hierarchies[i]; i++) { + for (int i = 0; ops->hierarchies[i]; i++) { int ret; __do_free char *fullpath = NULL; -- 2.47.2