From 5e2ba12a89b47a0d075e51e526b57333e712fa0e Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Thu, 14 Apr 2005 23:28:06 +0000 Subject: [PATCH] fixes from alexander von gernler svn:r148 --- buffer.c | 2 +- evbuffer.c | 5 +++++ kqueue.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) 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; -- 2.40.0