]> git.proxmox.com Git - mirror_lxc.git/commitdiff
cgroups: move variable into tighter scope
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 27 Jun 2019 12:48:34 +0000 (14:48 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 27 Jun 2019 14:08:21 +0000 (16:08 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 7e16f7a0c4b5bad7ba2fa7484419fb421fbb85db..619727267fa89041aa8413456b73afec95d23f1f 100644 (file)
@@ -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;