From: Alejandro Colomar Date: Wed, 3 Jul 2024 21:46:50 +0000 (+0200) Subject: src/suauth.c: check_su_auth(): Use strspn(3) instead of its pattern X-Git-Tag: 4.17.0-rc1~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb731369fd54e8df0ea25266f90bed5337c64734;p=thirdparty%2Fshadow.git src/suauth.c: check_su_auth(): Use strspn(3) instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/src/suauth.c b/src/suauth.c index 9def76c0e..895f1278b 100644 --- a/src/suauth.c +++ b/src/suauth.c @@ -84,9 +84,7 @@ int check_su_auth (const char *actual_id, stpcpy(strrspn(temp, " \t"), ""); - posn = 0; - while (temp[posn] == ' ' || temp[posn] == '\t') - posn++; + posn = strspn(temp, " \t"); if (temp[posn] == '#' || temp[posn] == '\0') { continue;