From: Andi Gutmans Date: Sun, 13 Feb 2000 15:59:32 +0000 (+0000) Subject: - Not sure if len can be zero but it's better to check it once then X-Git-Tag: BEFORE_SAPI_POST_PATCH_17_FEB_2000~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bac7a5085e34338cda2af215728c5375a57ffc35;p=php - Not sure if len can be zero but it's better to check it once then rechecking for it every loop and having an extra variable do nothing. --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 3426a4bf85..7614b78745 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2148,7 +2148,7 @@ PHP_FUNCTION(parse_str) */ int php_tag_find(char *tag, int len, char *set) { char c, *n, *t; - int i=0, state=0, done=0; + int state=0, done=0; char *norm = emalloc(len+1); n = norm; @@ -2159,7 +2159,10 @@ int php_tag_find(char *tag, int len, char *set) { and turn any into just and any into */ - while(i