lib/list.c: is_on_list(): Move code out of loop
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
08ae38e394
commit
fb01e07e83
+3
-4
@@ -235,13 +235,12 @@ bool is_on_list (char *const *list, const char *member)
|
||||
for (cp = members, i = 0;; i++) {
|
||||
array[i] = cp;
|
||||
cp = strchr(cp, ',');
|
||||
if (NULL != cp) {
|
||||
if (NULL != cp)
|
||||
*cp++ = '\0';
|
||||
} else {
|
||||
array[i + 1] = NULL;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
array[i+1] = NULL;
|
||||
|
||||
/*
|
||||
* Return the new array of pointers
|
||||
|
||||
Reference in New Issue
Block a user