From a8de4c49f1931d6f46272c0adea0e8f59b199098 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Wed, 16 Mar 2016 19:05:06 -0700 Subject: [PATCH] no variable decl in for loop Signed-off-by: Serge Hallyn --- src/lxc/cgfsng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, '/'); -- 2.47.2