From: Serge Hallyn Date: Thu, 17 Mar 2016 02:05:06 +0000 (-0700) Subject: no variable decl in for loop X-Git-Tag: lxc-2.0.0.rc11~4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F898%2Fhead;p=thirdparty%2Flxc.git no variable decl in for loop Signed-off-by: Serge Hallyn --- diff --git a/src/lxc/cgfsng.c b/src/lxc/cgfsng.c index 4a492269a..f369d2d0e 100644 --- a/src/lxc/cgfsng.c +++ b/src/lxc/cgfsng.c @@ -1309,6 +1309,7 @@ static bool cgfsng_mount(void *hdata, const char *root, int type) struct cgfsng_handler_data *d = hdata; char *tmpfspath = NULL; bool retval = false; + int i; if ((type & LXC_AUTO_CGROUP_MASK) == 0) return true; @@ -1330,7 +1331,7 @@ static bool cgfsng_mount(void *hdata, const char *root, int type) root) < 0) goto bad; - for (int i = 0; d->hierarchies[i]; i++) { + for (i = 0; d->hierarchies[i]; i++) { char *controllerpath, *path2; struct hierarchy *h = d->hierarchies[i]; char *controller = strrchr(h->mountpoint, '/');