From: Niels Provos Date: Thu, 14 Apr 2005 23:28:06 +0000 (+0000) Subject: fixes from alexander von gernler X-Git-Tag: release-1.1b~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e2ba12a89b47a0d075e51e526b57333e712fa0e;p=libevent fixes from alexander von gernler svn:r148 --- diff --git a/buffer.c b/buffer.c index f334f219..fb4576af 100644 --- a/buffer.c +++ b/buffer.c @@ -166,7 +166,7 @@ end: int evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen) { - int nread = datlen; + size_t nread = datlen; if (nread >= buf->off) nread = buf->off; diff --git a/evbuffer.c b/evbuffer.c index 1d7c263b..4354f0f9 100644 --- a/evbuffer.c +++ b/evbuffer.c @@ -45,6 +45,11 @@ #include "event.h" +/* prototypes */ + +void bufferevent_setwatermark(struct bufferevent *, short, size_t, size_t); +void bufferevent_read_pressure_cb(struct evbuffer *, size_t, size_t, void *); + static int bufferevent_add(struct event *ev, int timeout) { diff --git a/kqueue.c b/kqueue.c index 06af294b..3558b9c4 100644 --- a/kqueue.c +++ b/kqueue.c @@ -116,8 +116,8 @@ kq_init(void) } kqueueop->events = malloc(NEVENT * sizeof(struct kevent)); if (kqueueop->events == NULL) { - free (kqueueop); free (kqueueop->changes); + free (kqueueop); return (NULL); } kqueueop->nevents = NEVENT;