From: Alejandro Colomar Date: Sat, 8 Feb 2025 10:06:40 +0000 (+0100) Subject: lib/nss.c: Use !strcaseprefix() instead of its pattern X-Git-Tag: 4.18.0-rc1~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e208d0d6271ac11654950da7f7f3bbfe31e9a240;p=thirdparty%2Fshadow.git lib/nss.c: Use !strcaseprefix() instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/lib/nss.c b/lib/nss.c index a2eb9e006..d97e0709c 100644 --- a/lib/nss.c +++ b/lib/nss.c @@ -15,6 +15,7 @@ #include "shadowlog_internal.h" #include "shadowlog.h" #include "string/sprintf/snprintf.h" +#include "string/strcmp/strcaseprefix.h" #include "string/strcmp/streq.h" #include "string/strcmp/strprefix.h" #include "string/strspn/stpspn.h" @@ -84,7 +85,7 @@ nss_init(const char *nsswitch_path) { continue; if (strlen(line) < 8) continue; - if (strncasecmp(line, "subid:", 6) != 0) + if (!strcaseprefix(line, "subid:")) continue; p = &line[6]; p = stpspn(p, " \t\n");