lib/list.c: is_on_list(): Remove unnecessary use of temporary variable
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
34b113baba
commit
08ae38e394
+3
-5
@@ -234,11 +234,9 @@ bool is_on_list (char *const *list, const char *member)
|
||||
|
||||
for (cp = members, i = 0;; i++) {
|
||||
array[i] = cp;
|
||||
cp2 = strchr (cp, ',');
|
||||
if (NULL != cp2) {
|
||||
*cp2 = '\0';
|
||||
cp2++;
|
||||
cp = cp2;
|
||||
cp = strchr(cp, ',');
|
||||
if (NULL != cp) {
|
||||
*cp++ = '\0';
|
||||
} else {
|
||||
array[i + 1] = NULL;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user