com php-src: fix datatype mismatches: ext/standard/php_fopen _wrapper.c main/SAPI.c main/SAPI.h

From: Date: Tue, 24 Mar 2015 21:02:31 +0000
Subject: com php-src: fix datatype mismatches: ext/standard/php_fopen _wrapper.c main/SAPI.c main/SAPI.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85845@lists.php.net to get a copy of this message
Commit: 1a00554aafc832daf7db57b6c39120b68be926ba Author: Anatol Belski <ab@php.net> Tue, 24 Mar 2015 21:15:15 +0100 Parents: 3066851dab531ac44a5debbf9b187277158dfcac Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1a00554aafc832daf7db57b6c39120b68be926ba Log: fix datatype mismatches Changed paths: M ext/standard/php_fopen_wrapper.c M main/SAPI.c M main/SAPI.h Diff: diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 1dc6a21..f004c94 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -82,7 +82,7 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count) if (!SG(post_read) && SG(read_post_bytes) < (int64_t)(input->position + count)) { /* read requested data from SAPI */ - int read_bytes = sapi_read_post_block(buf, count); + size_t read_bytes = sapi_read_post_block(buf, count); if (read_bytes > 0) { php_stream_seek(input->body, 0, SEEK_END); diff --git a/main/SAPI.c b/main/SAPI.c index 2757c2e..f14638a 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -243,15 +243,15 @@ static void sapi_read_post_data(void) } } -SAPI_API int sapi_read_post_block(char *buffer, size_t buflen) +SAPI_API size_t sapi_read_post_block(char *buffer, size_t buflen) { - int read_bytes; + size_t read_bytes; if (!sapi_module.read_post) { - return -1; + return 0; } - read_bytes = (int)sapi_module.read_post(buffer, buflen); + read_bytes = sapi_module.read_post(buffer, buflen); if (read_bytes > 0) { /* gogo */ @@ -277,7 +277,7 @@ SAPI_API SAPI_POST_READER_FUNC(sapi_read_standard_form_data) SG(request_info)..request_body = php_stream_temp_create_ex(TEMP_STREAM_DEFAULT, SAPI_POST_BLOCK_SIZE, PG(upload_tmp_dir)); if (sapi_module.read_post) { - int read_bytes; + size_t read_bytes; for (;;) { char buffer[SAPI_POST_BLOCK_SIZE]; @@ -509,7 +509,7 @@ SAPI_API void sapi_deactivate(void) if (!SG(post_read)) { /* make sure we've consumed all request input data */ char dummy[SAPI_POST_BLOCK_SIZE]; - int read_bytes; + size_t read_bytes; do { read_bytes = sapi_read_post_block(dummy, SAPI_POST_BLOCK_SIZE); diff --git a/main/SAPI.h b/main/SAPI.h index e7a2721..67ee50d 100644 --- a/main/SAPI.h +++ b/main/SAPI.h @@ -192,7 +192,7 @@ SAPI_API int sapi_add_header_ex(char *header_line, size_t header_line_len, zend_ SAPI_API int sapi_send_headers(void); SAPI_API void sapi_free_header(sapi_header_struct *sapi_header); SAPI_API void sapi_handle_post(void *arg); -SAPI_API int sapi_read_post_block(char *buffer, size_t buflen); +SAPI_API size_t sapi_read_post_block(char *buffer, size_t buflen); SAPI_API int sapi_register_post_entries(sapi_post_entry *post_entry); SAPI_API int sapi_register_post_entry(sapi_post_entry *post_entry); SAPI_API void sapi_unregister_post_entry(sapi_post_entry *post_entry);

« previous php.cvs (#85845) next »