src/suauth.c: check_su_auth(): Use strspn(3) instead of its pattern

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2024-07-03 23:46:50 +02:00
committed by Serge Hallyn
parent 276f3fde26
commit fb731369fd

View File

@@ -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;