From: Christian Brauner Date: Thu, 27 Jun 2019 12:43:09 +0000 (+0200) Subject: cgroups: move variable into tighter scope X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a3d3232e1407e0b59303b995674678d2b4c908a1;p=thirdparty%2Flxc.git cgroups: move variable into tighter scope Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index c22238b75..a50d0b89b 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 (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;