From 6a720d7480123425ba83652816c946c40244cbe6 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 27 Jun 2019 14:48:34 +0200 Subject: [PATCH] cgroups: move variable into tighter scope Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 7e16f7a0c..619727267 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1546,7 +1546,7 @@ static int chowmod(char *path, uid_t chown_uid, gid_t chown_gid, */ static int chown_cgroup_wrapper(void *data) { - int i, ret; + int ret; uid_t destuid; struct generic_userns_exec_data *arg = data; uid_t nsuid = (arg->conf->root_nsuid_map != NULL) ? 0 : arg->conf->init_uid; @@ -1576,7 +1576,7 @@ static int chown_cgroup_wrapper(void *data) if (destuid == LXC_INVALID_UID) destuid = 0; - for (i = 0; arg->hierarchies[i]; i++) { + for (int i = 0; arg->hierarchies[i]; i++) { __do_free char *fullpath = NULL; char *path = arg->hierarchies[i]->container_full_path; -- 2.39.2