From e03540f80eb21014c0d4ae7ffece268bb8fcc663 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 19 Jul 2009 14:36:16 +0000 Subject: [PATCH] - Removed unnecessary strlen() call and if statement. --- ext/curl/interface.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; } -- 2.50.1