]> granicus.if.org Git - libevent/commitdiff
Fix compilation.
authorNick Mathewson <nickm@torproject.org>
Thu, 26 May 2011 21:43:17 +0000 (17:43 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 26 May 2011 21:43:17 +0000 (17:43 -0400)
http.c

diff --git a/http.c b/http.c
index b04fa5a19522ebbe726b733e6bfc58c5c1e99b69..27ca4292722c82f7fb3a7bd1cf29ae3b6061336e 100644 (file)
--- a/http.c
+++ b/http.c
@@ -840,8 +840,6 @@ evhttp_connection_done(struct evhttp_connection *evcon)
 static enum message_read_status
 evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
 {
-        ev_ssize_t len;
-
        if (req == NULL || buf == NULL) {
            return DATA_CORRUPTED;
        }
@@ -909,7 +907,7 @@ evhttp_handle_chunked_read(struct evhttp_request *req, struct evbuffer *buf)
                }
 
                /* don't have enough to complete a chunk; wait for more */
-               if (len < req->ntoread)
+               if (buflen < req->ntoread)
                        return (MORE_DATA_EXPECTED);
 
                /* Completed chunk */