From: Christian Brauner Date: Thu, 27 Jun 2019 12:45:36 +0000 (+0200) Subject: cgroups: move variable into tighter scope X-Git-Tag: lxc-3.2.0~18^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfa835ac211f3828b68fab7ef89ffd1ca7aeccb6;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 4205298b5..78ab8e7e6 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1765,7 +1765,7 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, const char *root, int type) { __do_free char *tmpfspath = NULL; - int i, ret; + int ret; bool has_cgns = false, retval = false, wants_force_mount = false; if (!ops->hierarchies) @@ -1803,7 +1803,7 @@ __cgfsng_ops static bool cgfsng_mount(struct cgroup_ops *ops, if (ret < 0) goto on_error; - for (i = 0; ops->hierarchies[i]; i++) { + for (int i = 0; ops->hierarchies[i]; i++) { __do_free char *controllerpath = NULL, *path2 = NULL; struct hierarchy *h = ops->hierarchies[i]; char *controller = strrchr(h->mountpoint, '/');