diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2023-03-11 00:01:02 -0800 |
---|---|---|
committer | Iker Pedrosa <ikerpedrosam@gmail.com> | 2023-03-28 13:00:38 +0200 |
commit | 5686d9162e81f3226986cbf554aa512b2b7c051f (patch) | |
tree | 2a188b8cded73d431f415832d7e80c5e3d92b12e | |
parent | c089196e15dcafc186474469c4914638da233b31 (diff) |
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>
-rw-r--r-- | lib/fields.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/fields.c b/lib/fields.c index 0b5f91b2..8801bce6 100644 --- a/lib/fields.c +++ b/lib/fields.c @@ -100,7 +100,6 @@ void change_field (char *buf, size_t maxsize, const char *prompt) cp++; } - strlcpy (buf, cp, maxsize); + strcpy (buf, cp); } } - |