cgfsng: controller_list_is_dup()

parent bb3401ca
...@@ -782,10 +782,9 @@ static bool controller_lists_intersect(char **l1, char **l2) ...@@ -782,10 +782,9 @@ static bool controller_lists_intersect(char **l1, char **l2)
return false; return false;
} }
/* /* For a null-terminated list of controllers @clist, return true if any of those
* For a null-terminated list of controllers @clist, return true if any of * controllers is already listed the null-terminated list of hierarchies @hlist.
* those controllers is already listed the null-terminated list of * Realistically, if one is present, all must be present.
* hierarchies @hlist. Realistically, if one is present, all must be present.
*/ */
static bool controller_list_is_dup(struct hierarchy **hlist, char **clist) 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) ...@@ -793,11 +792,12 @@ static bool controller_list_is_dup(struct hierarchy **hlist, char **clist)
if (!hlist) if (!hlist)
return false; return false;
for (i = 0; hlist[i]; i++) for (i = 0; hlist[i]; i++)
if (controller_lists_intersect(hlist[i]->controllers, clist)) if (controller_lists_intersect(hlist[i]->controllers, clist))
return true; return true;
return false;
return false;
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment