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:
Alejandro Colomar
2024-03-14 17:11:36 -05:00
committed by Serge Hallyn
parent 34b113baba
commit 08ae38e394
+3 -5
View File
@@ -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;