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.2.11RC1~146 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e03540f80eb21014c0d4ae7ffece268bb8fcc663;p=php - Removed unnecessary strlen() call and if statement. --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 58edf22904..cb1cba2d86 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1576,14 +1576,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; }