mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 04:19:10 -04:00
fixes from alexander von gernler
svn:r148
This commit is contained in:
parent
bc2c695b76
commit
5e2ba12a89
2
buffer.c
2
buffer.c
@ -166,7 +166,7 @@ end:
|
|||||||
int
|
int
|
||||||
evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen)
|
evbuffer_remove(struct evbuffer *buf, void *data, size_t datlen)
|
||||||
{
|
{
|
||||||
int nread = datlen;
|
size_t nread = datlen;
|
||||||
if (nread >= buf->off)
|
if (nread >= buf->off)
|
||||||
nread = buf->off;
|
nread = buf->off;
|
||||||
|
|
||||||
|
@ -45,6 +45,11 @@
|
|||||||
|
|
||||||
#include "event.h"
|
#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
|
static int
|
||||||
bufferevent_add(struct event *ev, int timeout)
|
bufferevent_add(struct event *ev, int timeout)
|
||||||
{
|
{
|
||||||
|
2
kqueue.c
2
kqueue.c
@ -116,8 +116,8 @@ kq_init(void)
|
|||||||
}
|
}
|
||||||
kqueueop->events = malloc(NEVENT * sizeof(struct kevent));
|
kqueueop->events = malloc(NEVENT * sizeof(struct kevent));
|
||||||
if (kqueueop->events == NULL) {
|
if (kqueueop->events == NULL) {
|
||||||
free (kqueueop);
|
|
||||||
free (kqueueop->changes);
|
free (kqueueop->changes);
|
||||||
|
free (kqueueop);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
kqueueop->nevents = NEVENT;
|
kqueueop->nevents = NEVENT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user