]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/fields.c: Remove dead code
authorAlejandro Colomar <alx@kernel.org>
Thu, 4 Jul 2024 20:42:15 +0000 (22:42 +0200)
committerSerge Hallyn <serge@hallyn.com>
Thu, 31 Oct 2024 02:15:30 +0000 (21:15 -0500)
A few lines above, we've removed the '\n' already.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/fields.c

index 32399fe5dd77e8abde3280e55df8dd1d37845467..b4aa868c816b9c0916d282582432310c1dd9c1e0 100644 (file)
@@ -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);
        }