]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/: Use !strprefix() instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Tue, 10 Dec 2024 14:24:45 +0000 (15:24 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 26 May 2025 16:29:26 +0000 (11:29 -0500)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/port.c

index b19ecd6be5c2ce0caed3bd01d98c897ade033fbb..a30e681897e887af77d5303f7fb8844a577b8736 100644 (file)
@@ -50,7 +50,7 @@ static int portcmp (const char *pattern, const char *port)
        if (streq(orig, "SU"))
                return 1;
 
-       return (*pattern == '*') ? 0 : 1;
+       return !strprefix(pattern, "*");
 }
 
 /*