From 7e754cc44747a99755e063e7cdaeeffef8df1185 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 9 Jan 2024 20:21:39 +0100 Subject: [PATCH] lib/shadow.c: my_sgetspent(): Remove dead code spwd.sp_flag is an unsigned long, which can never be negative. Reviewed-by: "Serge E. Hallyn" Signed-off-by: Alejandro Colomar --- lib/shadow.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/shadow.c b/lib/shadow.c index 8c1fc8a5..a593e54a 100644 --- a/lib/shadow.c +++ b/lib/shadow.c @@ -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); }