From: Alejandro Colomar Date: Wed, 3 Jul 2024 21:13:18 +0000 (+0200) Subject: lib/port.c: portcmp(): Use strcmp(3) instead of its pattern X-Git-Tag: 4.17.0-rc1~61 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02d4af7f6f673ab52962d9b7e34f61fa56c14549;p=thirdparty%2Fshadow.git lib/port.c: portcmp(): Use strcmp(3) instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/lib/port.c b/lib/port.c index 136e1ee0f..fe25fa9af 100644 --- a/lib/port.c +++ b/lib/port.c @@ -46,9 +46,8 @@ static int portcmp (const char *pattern, const char *port) if (('\0' == *pattern) && ('\0' == *port)) { return 0; } - if (('S' == orig[0]) && ('U' == orig[1]) && ('\0' == orig[2])) { + if (strcmp(orig, "SU") == 0) return 1; - } return (*pattern == '*') ? 0 : 1; }