]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/login_nopam.c: list_match(): Add superfluous else
authorAlejandro Colomar <alx@kernel.org>
Thu, 16 Jan 2025 21:25:31 +0000 (22:25 +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 2afc00a587a0d02d8ae09850f5d30d797bf21513..f59811b60edbd7e46d992323bf307d34acc158cd 100644 (file)
@@ -160,8 +160,8 @@ list_match(char *list, const char *item, bool (*match_fn)(char *, const char*))
        while (NULL != (tok = strsep(&list, sep))) {
                if (strcasecmp (tok, "EXCEPT") == 0) {  /* EXCEPT: give up */
                        break;
-               }
-               if ((*match_fn)(tok, item)) {
+
+               } else if ((*match_fn)(tok, item)) {
                        match = true;
                        break;
                }