]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
no variable decl in for loop 898/head
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 17 Mar 2016 02:05:06 +0000 (19:05 -0700)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 17 Mar 2016 02:05:06 +0000 (19:05 -0700)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/cgfsng.c

index 4a492269aac7afce5f1bf15323b396bf8f99bc97..f369d2d0e3ff2dbe29329dd269df9fb1fb81c2ce 100644 (file)
@@ -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, '/');