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:
parent
c089196e15
commit
5686d9162e
@ -100,7 +100,6 @@ void change_field (char *buf, size_t maxsize, const char *prompt)
|
||||
cp++;
|
||||
}
|
||||
|
||||
strlcpy (buf, cp, maxsize);
|
||||
strcpy (buf, cp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user