1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00

remove unused variable repllen.

i tried to see if it could be useful, but this function is kinda crazy.
from Julien Ramseier
This commit is contained in:
tedu 2017-01-03 21:47:37 +00:00
parent 1d72019a0f
commit cb3284a8d3

View File

@ -1,4 +1,4 @@
/* $OpenBSD: strnsubst.c,v 1.5 2009/10/27 23:59:50 deraadt Exp $ */
/* $OpenBSD: strnsubst.c,v 1.6 2017/01/03 21:47:37 tedu Exp $ */
/* $FreeBSD: strnsubst.c,v 1.6 2002/06/22 12:58:42 jmallett Exp $ */
/*
@ -31,7 +31,7 @@ void
strnsubst(char **str, const char *match, const char *replstr, size_t maxsize)
{
char *s1, *s2, *this;
size_t matchlen, repllen, s2len;
size_t matchlen, s2len;
int n;
if ((s1 = *str) == NULL)
@ -50,7 +50,6 @@ strnsubst(char **str, const char *match, const char *replstr, size_t maxsize)
*s2 = '\0';
s2len = 0;
matchlen = strlen(match);
repllen = strlen(replstr);
for (;;) {
if ((this = strstr(s1, match)) == NULL)
break;