]> git.proxmox.com Git - mirror_lxc.git/commitdiff
cgroups: move variable into tighter scope
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 27 Jun 2019 12:43:09 +0000 (14:43 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 27 Jun 2019 14:08:18 +0000 (16:08 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index f29ccd1bcc11a6c9ccc03585c75c9248da477073..7971cea6016d2439c2093d55c19b64f69671e5e0 100644 (file)
@@ -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;