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
+3 -4
View File
@@ -56,7 +56,7 @@ static void read_env_file (const char *filename)
if (NULL == cp) {
break;
}
*cp = '\0';
stpcpy(cp, "");
cp = buf;
/* ignore whitespace and comments */
@@ -78,8 +78,7 @@ static void read_env_file (const char *filename)
continue;
}
/* NUL-terminate the name */
*cp = '\0';
cp++;
stpcpy(cp++, "");
val = cp;
#if 0 /* XXX untested, and needs rewrite with fewer goto's :-) */
/*
@@ -112,7 +111,7 @@ static void read_env_file (const char *filename)
goto finished;
} else if (isspace (*cp)) {
/* unescaped whitespace - end of string */
*cp = '\0';
stpcpy(cp, "");
goto finished;
} else {
cp++;