From: Ryan Bloom Date: Thu, 11 Oct 2001 04:40:14 +0000 (+0000) Subject: Remove some warnings from the code. The buckets take a different X-Git-Tag: 2.0.26~41 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=0385ad938a8bcbabe197eb35142203d81869ac8d;p=thirdparty%2Fapache%2Fhttpd.git Remove some warnings from the code. The buckets take a different type for the length than the brigade functions do. This moves the len_read variable into the correct scope for the two times that it is used, and defines it correctly for each scope. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91417 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index efdf838fc28..a64ae492230 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1355,7 +1355,7 @@ static long get_chunk_size(char *b) */ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz) { - apr_size_t len_read, total; + apr_size_t total; apr_status_t rv; apr_bucket *b, *old; const char *tempbuf; @@ -1365,6 +1365,7 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bu apr_bucket_brigade *bb = req_cfg->bb; do { + apr_off_t len_read; if (APR_BRIGADE_EMPTY(bb)) { len_read = r->remaining; if (ap_get_brigade(r->input_filters, bb, AP_MODE_BLOCKING, @@ -1399,6 +1400,7 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bu while (total < bufsiz && b != APR_BRIGADE_SENTINEL(bb) && !APR_BUCKET_IS_EOS(b)) { + apr_size_t len_read; if ((rv = apr_bucket_read(b, &tempbuf, &len_read, APR_BLOCK_READ)) != APR_SUCCESS) { return -1;