]> granicus.if.org Git - php/commitdiff
- Removed unnecessary strlen() call and if statement.
authorFelipe Pena <felipe@php.net>
Sun, 19 Jul 2009 14:36:16 +0000 (14:36 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 19 Jul 2009 14:36:16 +0000 (14:36 +0000)
ext/curl/interface.c

index d07c90814b5a368d991eb21e7d8cd2a7ff170cb2..040942aa2f2c6d9be695459173512946a08dc4f7 100644 (file)
@@ -1866,14 +1866,11 @@ type_conflict:
                                                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';
                                                }
                                                /* open_basedir check */
                                                if (php_check_open_basedir(postval TSRMLS_CC)) {
-                                                       if (type) {
-                                                               *type = ';';
-                                                       }
                                                        RETVAL_FALSE;
                                                        return 1;
                                                }