]> granicus.if.org Git - libevent/commitdiff
Add missing return value in event_base_foreach_event
authorNick Mathewson <nickm@torproject.org>
Mon, 10 Sep 2012 17:43:26 +0000 (13:43 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 10 Sep 2012 17:43:26 +0000 (13:43 -0400)
Fix for github issue nmathewson/Libevent #65

Found by Joachim Bauch

event.c

diff --git a/event.c b/event.c
index 3e917fb963b4342b38ecfa03768aa4a2d1d6fd82..c209213a117e2c710faac78620b31fa0fc0ef356 100644 (file)
--- a/event.c
+++ b/event.c
@@ -3314,7 +3314,7 @@ event_base_foreach_event(struct event_base *base,
 {
        int r;
        if ((!fn) || (!base)) {
-               return;
+               return -1;
        }
        EVBASE_ACQUIRE_LOCK(base, th_base_lock);
        r = event_base_foreach_event_nolock_(base, fn, arg);