Skip to content

Commit ffdf778

Browse files
lib/fields.c: Remove dead code
A few lines above, we've removed the '\n' already. Signed-off-by: Alejandro Colomar <[email protected]>
1 parent e1180ed commit ffdf778

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/fields.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ int valid_field (const char *field, const char *illegal)
6767
* prompt the user with the name of the field being changed and the
6868
* current value.
6969
*/
70-
void change_field (char *buf, size_t maxsize, const char *prompt)
70+
void
71+
change_field(char *buf, size_t maxsize, const char *prompt)
7172
{
7273
char newf[200];
7374
char *cp;
@@ -91,7 +92,7 @@ void change_field (char *buf, size_t maxsize, const char *prompt)
9192
* makes it possible to change the field to empty, by
9293
* entering a space. --marekm
9394
*/
94-
stpcpy(strrspn(newf, " \t\n"), "");
95+
stpcpy(strrspn(newf, " \t"), "");
9596
cp = stpspn(newf, " \t");
9697
strcpy (buf, cp);
9798
}

0 commit comments

Comments
 (0)