From: Alejandro Colomar Date: Thu, 4 Jul 2024 20:42:15 +0000 (+0200) Subject: lib/fields.c: Remove dead code X-Git-Tag: 4.17.0-rc1~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0589cbc135eb58f6ebfeaaa1be5845877ab8f024;p=thirdparty%2Fshadow.git lib/fields.c: Remove dead code A few lines above, we've removed the '\n' already. Signed-off-by: Alejandro Colomar --- diff --git a/lib/fields.c b/lib/fields.c index 32399fe5d..b4aa868c8 100644 --- a/lib/fields.c +++ b/lib/fields.c @@ -67,7 +67,8 @@ int valid_field (const char *field, const char *illegal) * prompt the user with the name of the field being changed and the * current value. */ -void change_field (char *buf, size_t maxsize, const char *prompt) +void +change_field(char *buf, size_t maxsize, const char *prompt) { char newf[200]; char *cp; @@ -91,7 +92,7 @@ void change_field (char *buf, size_t maxsize, const char *prompt) * makes it possible to change the field to empty, by * entering a space. --marekm */ - stpcpy(strrspn(newf, " \t\n"), ""); + stpcpy(strrspn(newf, " \t"), ""); cp = stpspn(newf, " \t"); strcpy (buf, cp); }