cvs: php-src /ext/curl interface.c
| From: | Ilia Alshanetsky | Date: | Mon, 20 Nov 2006 19:06:10 +0000 |
| Subject: | cvs: php-src /ext/curl interface.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41652@lists.php.net to get a copy of this message | ||
iliaa Mon Nov 20 19:06:10 2006 UTC
Modified files:
/php-src/ext/curl interface.c
Log:
MFB: Fixed compiler warnings
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.94&r2=1.95&diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.94 php-src/ext/curl/interface.c:1.95
--- php-src/ext/curl/interface.c:1.94 Fri Nov 3 14:53:27 2006
+++ php-src/ext/curl/interface.c Mon Nov 20 19:06:09 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interface.c,v 1.94 2006/11/03 14:53:27 iliaa Exp $ */
+/* $Id: interface.c,v 1.95 2006/11/20 19:06:09 iliaa Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -164,17 +164,17 @@
\
if (!(tmp_url = php_url_parse_ex(str, len))) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL '%s'", str); \
- RETURN_FALSE; \
+ RETVAL_FALSE; \
} \
\
if (php_memnstr(str, tmp_url->path, strlen(tmp_url->path), str + len)) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL '%s' contains unencoded control
characters", str); \
- RETURN_FALSE; \
+ RETVAL_FALSE; \
} \
\
if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path
TSRMLS_CC)) { \
php_url_free(tmp_url); \
- RETURN_FALSE; \
+ RETVAL_FALSE; \
} \
php_url_free(tmp_url); \
}
@@ -1077,6 +1077,7 @@
if (argc > 0) {
convert_to_string_ex(url);
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
+ return;
}
cp = curl_easy_init();
@@ -1267,7 +1268,8 @@
if (PG(open_basedir) && *PG(open_basedir)) {
if (Z_LVAL_PP(zvalue) != 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated
when open_basedir is set");
- RETURN_FALSE;
+ RETVAL_FALSE;
+ return 1;
}
}
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
@@ -1301,6 +1303,7 @@
if (option == CURLOPT_URL) {
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
+ return 1;
}
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
@@ -1318,7 +1321,10 @@
void * what;
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1,
php_file_le_stream());
- ZEND_VERIFY_RESOURCE(what);
+ if (!what) {
+ RETVAL_FALSE;
+ return 1;
+ }
if (FAILURE == php_stream_cast((php_stream *) what, PHP_STREAM_AS_STDIO, (void *) &fp,
REPORT_ERRORS)) {
RETVAL_FALSE;