From: Hartmut Holzgraefe Date: Mon, 21 Oct 2002 19:08:18 +0000 (+0000) Subject: killed some warnings identified by sebastian X-Git-Tag: php-4.3.0pre2~225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30ed5a5483ff2276f56c7292fce62b66f5189687;p=php killed some warnings identified by sebastian --- diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index cfaad71e0f..50d5e50035 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -73,7 +73,7 @@ static size_t php_stream_input_write(php_stream *stream, const char *buf, size_t static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) { - int read_bytes; + size_t read_bytes = 0; if(!stream->eof) { if(SG(request_info).post_data) { /* data has already been read by a post handler */ read_bytes = SG(request_info).post_data_length - stream->position; @@ -85,16 +85,16 @@ static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count if(read_bytes) { memcpy(buf, SG(request_info).post_data + stream->position, read_bytes); } - return read_bytes; } else { read_bytes = sapi_module.read_post(buf, count TSRMLS_CC); if(read_bytes <= 0){ stream->eof = 1; read_bytes = 0; } - return read_bytes; } } + + return read_bytes; } static int php_stream_input_close(php_stream *stream, int close_handle TSRMLS_DC)