1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-20 15:43:16 +00:00

*str is spelled 's1' inside the body of the code.

Make 'this' not a local variable, since it isn't necessary or complex enough
to warrant such.
This commit is contained in:
Juli Mallett 2002-05-02 02:15:06 +00:00
parent 639c9550fb
commit 299ea75ab7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95900

View File

@ -29,7 +29,7 @@ void strnsubst(char **, const char *, const char *, size_t);
void
strnsubst(char **str, const char *match, const char *replstr, size_t maxsize)
{
char *s1, *s2;
char *s1, *s2, *this;
s1 = *str;
if (s1 == NULL)
@ -38,14 +38,12 @@ strnsubst(char **str, const char *match, const char *replstr, size_t maxsize)
if (s2 == NULL)
err(1, "calloc");
if (match == NULL || replstr == NULL || maxsize == strlen(*str)) {
if (match == NULL || replstr == NULL || maxsize == strlen(s1)) {
strlcpy(s2, s1, maxsize);
goto done;
}
for (;;) {
char *this;
this = strstr(s1, match);
if (this == NULL)
break;