Skip to content

Commit

Permalink
lib/fields.c: Remove dead code
Browse files Browse the repository at this point in the history
A few lines above, we've removed the '\n' already.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
  • Loading branch information
alejandro-colomar committed Aug 26, 2024
1 parent d2c77cf commit d70eb4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/fields.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit d70eb4d

Please sign in to comment.