diff --git a/lib/list.c b/lib/list.c index b88f5c5a..28f53068 100644 --- a/lib/list.c +++ b/lib/list.c @@ -232,15 +232,13 @@ bool is_on_list (char *const *list, const char *member) * array of pointers. */ - for (cp = members, i = 0;; i++) { + for (cp = members, i = 0; cp != NULL; i++) { array[i] = cp; cp = strchr(cp, ','); if (NULL != cp) *cp++ = '\0'; - else - break; } - array[i+1] = NULL; + array[i] = NULL; /* * Return the new array of pointers