From fb731369fd54e8df0ea25266f90bed5337c64734 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 3 Jul 2024 23:46:50 +0200 Subject: [PATCH] src/suauth.c: check_su_auth(): Use strspn(3) instead of its pattern Signed-off-by: Alejandro Colomar --- src/suauth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.47.3