From 848bf5cd4164f53336c1b536915a918ddaeaec77 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 17 Jan 2010 03:44:50 +0000 Subject: [PATCH] (trunk libevent) add more debugging assertions so I can continue to torture exiva... --- third-party/libevent/event.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/third-party/libevent/event.c b/third-party/libevent/event.c index 96bd0bd0b..fdcda5082 100644 --- a/third-party/libevent/event.c +++ b/third-party/libevent/event.c @@ -836,6 +836,9 @@ event_del(struct event *ev) void event_active(struct event *ev, int res, short ncalls) { + assert(ev != NULL); + assert(res != 0); + /* We get different kinds of events, add them together */ if (ev->ev_flags & EVLIST_ACTIVE) { ev->ev_res |= res; @@ -974,6 +977,10 @@ event_queue_remove(struct event_base *base, struct event *ev, int queue) void event_queue_insert(struct event_base *base, struct event *ev, int queue) { + assert(base != NULL); + assert(ev != NULL); + assert(queue != 0); + if (ev->ev_flags & queue) { /* Double insertion is possible for active events */ if (queue & EVLIST_ACTIVE)