contrib, lib/, src/, tests/: Use stpcpy(3) instead of its pattern
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
c6018240f8
commit
59e5eef38f
+2
-2
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user