From: Alejandro Colomar Date: Tue, 10 Dec 2024 14:24:45 +0000 (+0100) Subject: lib/: Use !strprefix() instead of its pattern X-Git-Tag: 4.18.0-rc1~75 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=098f97c139c962df3b6b7ae688b8694d614684a3;p=thirdparty%2Fshadow.git lib/: Use !strprefix() instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/lib/port.c b/lib/port.c index b19ecd6be..a30e68189 100644 --- a/lib/port.c +++ b/lib/port.c @@ -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, "*"); } /*