]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: controller_list_is_dup()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 18:09:18 +0000 (19:09 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Feb 2018 14:48:21 +0000 (15:48 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 6e7f6d6228ac0daecce1af9be6deee68124b8623..a14050f11c10b844a5b07f31b43636ddc6d264e3 100644 (file)
@@ -782,10 +782,9 @@ static bool controller_lists_intersect(char **l1, char **l2)
        return false;
 }
 
-/*
- * For a null-terminated list of controllers @clist, return true if any of
- * those controllers is already listed the null-terminated list of
- * hierarchies @hlist.  Realistically, if one is present, all must be present.
+/* For a null-terminated list of controllers @clist, return true if any of those
+ * controllers is already listed the null-terminated list of hierarchies @hlist.
+ * Realistically, if one is present, all must be present.
  */
 static bool controller_list_is_dup(struct hierarchy **hlist, char **clist)
 {
@@ -793,11 +792,12 @@ static bool controller_list_is_dup(struct hierarchy **hlist, char **clist)
 
        if (!hlist)
                return false;
+
        for (i = 0; hlist[i]; i++)
                if (controller_lists_intersect(hlist[i]->controllers, clist))
                        return true;
-       return false;
 
+       return false;
 }
 
 /*