diff options
author | Anatol Belski <ab@php.net> | 2015-03-24 21:15:15 +0100 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-03-24 22:02:31 +0100 |
commit | 1a00554aafc832daf7db57b6c39120b68be926ba (patch) | |
tree | f0d1cf2e0c60b34287bb0be1f23884c2dad9f7f7 | |
parent | 3066851dab531ac44a5debbf9b187277158dfcac (diff) | |
download | php-git-1a00554aafc832daf7db57b6c39120b68be926ba.tar.gz |
fix datatype mismatches
-rw-r--r-- | ext/standard/php_fopen_wrapper.c | 2 | ||||
-rw-r--r-- | main/SAPI.c | 12 | ||||
-rw-r--r-- | main/SAPI.h | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 1dc6a21cf5..f004c943b5 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 2757c2e521..f14638a22f 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 e7a2721641..67ee50dec2 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); |