summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-07-19 14:36:16 +0000
committerFelipe Pena <felipe@php.net>2009-07-19 14:36:16 +0000
commitea2abdc3787264247c7ffd1297818d383ea76252 (patch)
treed7e2266e7c805086ed59f3d91c989987795ce113
parent91841e0987d79a438217e8d4ccf117e4ed63111e (diff)
downloadphp-git-ea2abdc3787264247c7ffd1297818d383ea76252.tar.gz
- Removed unnecessary strlen() call and if statement.
-rw-r--r--ext/curl/interface.c5
1 files changed, 1 insertions, 4 deletions
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;
}