From: Gyepi Sam Date: Tue, 22 Jan 2013 16:59:07 +0000 (+0000) Subject: Fix a mistake in evbuffer_remove() arguments in example http server code X-Git-Tag: release-2.1.3-alpha~56^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c322c2077e2d16f64ed3a90f74ad714842600624;p=libevent Fix a mistake in evbuffer_remove() arguments in example http server code (commit message by nickm) --- diff --git a/sample/http-server.c b/sample/http-server.c index fb455792..916f6d4c 100644 --- a/sample/http-server.c +++ b/sample/http-server.c @@ -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); }