]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/login_nopam.c: list_match(): Refactor conditional
authorAlejandro Colomar <alx@kernel.org>
Sat, 18 Jan 2025 19:16:24 +0000 (20:16 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sat, 18 Jan 2025 20:32:20 +0000 (21:32 +0100)
This is just a no-op refactor in preparation for the following commits.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/login_nopam.c

index a9be91d3ba64452c32e7ad15c3269238329be6ca..2afc00a587a0d02d8ae09850f5d30d797bf21513 100644 (file)
@@ -161,8 +161,8 @@ list_match(char *list, const char *item, bool (*match_fn)(char *, const char*))
                if (strcasecmp (tok, "EXCEPT") == 0) {  /* EXCEPT: give up */
                        break;
                }
-               match = (*match_fn) (tok, item);
-               if (match) {
+               if ((*match_fn)(tok, item)) {
+                       match = true;
                        break;
                }
        }