]> granicus.if.org Git - libevent/commitdiff
Fix a mistake in evbuffer_remove() arguments in example http server code
authorGyepi Sam <gyepi@users.sourceforge.net>
Tue, 22 Jan 2013 16:59:07 +0000 (16:59 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 22 Jan 2013 16:59:07 +0000 (16:59 +0000)
(commit message by nickm)

sample/http-server.c

index fb45579260f39697d2bb820fc9e66778bfe25669..916f6d4c1f0f4877521b5d363bae4bd61fd9d013 100644 (file)
@@ -132,7 +132,7 @@ dump_request_cb(struct evhttp_request *req, void *arg)
        while (evbuffer_get_length(buf)) {
                int n;
                char cbuf[128];
-               n = evbuffer_remove(buf, cbuf, sizeof(buf)-1);
+               n = evbuffer_remove(buf, cbuf, sizeof(cbuf));
                if (n > 0)
                        (void) fwrite(cbuf, 1, n, stdout);
        }