Skip to content

Commit

Permalink
lib/list.c: is_on_list(): Remove unnecessary use of temporary variable
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar authored and hallyn committed Mar 14, 2024
1 parent 34b113b commit 08ae38e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08ae38e

Please sign in to comment.