From 5686d9162e81f3226986cbf554aa512b2b7c051f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 11 Mar 2023 00:01:02 -0800 Subject: [PATCH] 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 Signed-off-by: Alejandro Colomar Reviewed-by: Iker Pedrosa --- lib/fields.c | 3 +-- 1 file changed, 1 insertion(+), 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); } } -