Simplify change_field() by using strcpy

* lib/fields.c (change_field): Since we know the string fits,
use strcpy(3) rather than strlcpy(3).

Signed-off-by: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
Paul Eggert 2023-03-11 00:01:02 -08:00 committed by Iker Pedrosa
parent c089196e15
commit 5686d9162e

View File

@ -100,7 +100,6 @@ void change_field (char *buf, size_t maxsize, const char *prompt)
cp++; cp++;
} }
strlcpy (buf, cp, maxsize); strcpy (buf, cp);
} }
} }