fixes from alexander von gernler

svn:r148
This commit is contained in:
Niels Provos 2005-04-14 23:28:06 +00:00
parent bc2c695b76
commit 5e2ba12a89
3 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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)
{

View File

@ -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;