]> git.ipfire.org Git - thirdparty/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>
Sun, 11 Aug 2019 19:37:51 +0000 (21:37 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index c22238b75ecf5f16c7178af3f37fc5eee205758b..a50d0b89b3473f61b87f019a81ec6aa4a0aeaf51 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 (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;