]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/shadow.c: my_sgetspent(): Remove dead code
authorAlejandro Colomar <alx@kernel.org>
Tue, 9 Jan 2024 19:21:39 +0000 (20:21 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 2 Jul 2024 20:52:31 +0000 (22:52 +0200)
spwd.sp_flag is an unsigned long, which can never be negative.

Reviewed-by: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/shadow.c

index 8c1fc8a5e42b95ff1108f204f12d0afef07d2b4b..a593e54a4a7c998a958106e8d1c020886b5e1989 100644 (file)
@@ -195,8 +195,6 @@ static struct spwd *my_sgetspent (const char *string)
                spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
        else if (str2ul(&spwd.sp_flag, fields[8]) == -1)
                return 0;
-       else if (spwd.sp_flag < 0)
-               return 0;
 
        return (&spwd);
 }