svn: php/php-src/ branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c
| From: | Felipe Pena | Date: | Sun, 19 Jul 2009 14:36:16 +0000 |
| Subject: | svn: php/php-src/ branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-59599@lists.php.net to get a copy of this message | ||
felipe Sun, 19 Jul 2009 14:36:16 +0000
URL: http://svn.php.net/viewvc?view=revision&revision=284352
Changed paths:
U php/php-src/branches/PHP_5_2/ext/curl/interface.c
U php/php-src/branches/PHP_5_3/ext/curl/interface.c
U php/php-src/trunk/ext/curl/interface.c
Log:
- Removed unnecessary strlen() call and if statement.
Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-07-19 14:19:32 UTC (rev 284351)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c 2009-07-19 14:36:16 UTC (rev 284352)
@@ -1576,14 +1576,11 @@
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;
}
Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-07-19 14:19:32 UTC (rev 284351)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c 2009-07-19 14:36:16 UTC (rev 284352)
@@ -1803,14 +1803,11 @@
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;
}
Modified: php/php-src/trunk/ext/curl/interface.c
===================================================================
--- php/php-src/trunk/ext/curl/interface.c 2009-07-19 14:19:32 UTC (rev 284351)
+++ php/php-src/trunk/ext/curl/interface.c 2009-07-19 14:36:16 UTC (rev 284352)
@@ -1866,14 +1866,11 @@
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;
}