]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Remove some warnings from the code. The buckets take a different
authorRyan Bloom <rbb@apache.org>
Thu, 11 Oct 2001 04:40:14 +0000 (04:40 +0000)
committerRyan Bloom <rbb@apache.org>
Thu, 11 Oct 2001 04:40:14 +0000 (04:40 +0000)
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

modules/http/http_protocol.c

index efdf838fc28eb6df522b7e85732cf26e25156238..a64ae49223052276d9822afe1aacd381744bcc8e 100644 (file)
@@ -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;