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

index bb0c90981f4997fa6b6163720262037817546989..ae2f5dcf9356134c56d138092b75862c0b4db724 100644 (file)
@@ -2411,15 +2411,13 @@ __cgfsng_ops static bool cgfsng_setup_limits(struct cgroup_ops *ops,
 static bool cgroup_use_wants_controllers(const struct cgroup_ops *ops,
                                       char **controllers)
 {
-       char **cur_ctrl, **cur_use;
-
        if (!ops->cgroup_use)
                return true;
 
-       for (cur_ctrl = controllers; cur_ctrl && *cur_ctrl; cur_ctrl++) {
+       for (char **cur_ctrl = controllers; cur_ctrl && *cur_ctrl; cur_ctrl++) {
                bool found = false;
 
-               for (cur_use = ops->cgroup_use; cur_use && *cur_use; cur_use++) {
+               for (char **cur_use = ops->cgroup_use; cur_use && *cur_use; cur_use++) {
                        if (strcmp(*cur_use, *cur_ctrl) != 0)
                                continue;