]> 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>
Sat, 17 Feb 2018 18:09:18 +0000 (19:09 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index b67f41a81926ddb368adf1839d1168e616535601..95aa93d74c941181239cd475f7eec34009c76a94 100644 (file)
@@ -791,10 +791,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)
 {
@@ -802,11 +801,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;
 }
 
 /*