mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Remove extraneous strlen() call
This commit is contained in:
parent
b98a486606
commit
d33636f764
@ -1194,14 +1194,12 @@ static int strToMatch(const char* str ,char *retstr)
|
|||||||
char* anchor = NULL;
|
char* anchor = NULL;
|
||||||
const char* anchor1 = NULL;
|
const char* anchor1 = NULL;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int len = 0;
|
|
||||||
|
|
||||||
if( (!str) || str[0] == '\0'){
|
if( (!str) || str[0] == '\0'){
|
||||||
return result;
|
return result;
|
||||||
} else {
|
} else {
|
||||||
anchor = retstr;
|
anchor = retstr;
|
||||||
anchor1 = str;
|
anchor1 = str;
|
||||||
len = strlen(str);
|
|
||||||
while( (*str)!='\0' ){
|
while( (*str)!='\0' ){
|
||||||
if( *str == '-' ){
|
if( *str == '-' ){
|
||||||
*retstr = '_';
|
*retstr = '_';
|
||||||
|
Loading…
Reference in New Issue
Block a user