From: Felipe Pena Date: Sun, 19 Jul 2009 14:36:16 +0000 (+0000) Subject: - Removed unnecessary strlen() call and if statement. X-Git-Tag: php-5.3.1RC1~349 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea2abdc3787264247c7ffd1297818d383ea76252;p=php - Removed unnecessary strlen() call and if statement. --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 0e4b4daa4b..7ee9b367d2 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1803,14 +1803,11 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu char *type; ++postval; - if ((type = php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + strlen(postval)))) { + if ((type = php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + Z_STRLEN_PP(current)))) { *type = '\0'; } /* safe_mode / open_basedir check */ if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) { - if (type) { - *type = ';'; - } RETVAL_FALSE; return 1; }