contrib, lib/, src/, tests/: Use stpcpy(3) instead of its pattern

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2024-05-19 01:53:12 +02:00
committed by Serge Hallyn
parent c6018240f8
commit 59e5eef38f
34 changed files with 104 additions and 132 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ void change_field (char *buf, size_t maxsize, const char *prompt)
if (NULL == cp) {
return;
}
*cp = '\0';
stpcpy(cp, "");
if ('\0' != newf[0]) {
/*
@@ -92,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
*/
*strrspn(newf, " \t\n") = '\0';
stpcpy(strrspn(newf, " \t\n"), "");
cp = newf;
while (isspace (*cp)) {