]> granicus.if.org Git - libevent/commitdiff
Fix a warning when building without threading.
authorNick Mathewson <nickm@torproject.org>
Sun, 18 Nov 2012 06:40:13 +0000 (01:40 -0500)
committerNick Mathewson <nickm@torproject.org>
Sun, 18 Nov 2012 06:40:13 +0000 (01:40 -0500)
event.c

diff --git a/event.c b/event.c
index 0fdd5d3317095b9e2b40727a4e0aae9557c5774d..ce2828fe18eefd458d3aed71efadf4b0dfeced2d 100644 (file)
--- a/event.c
+++ b/event.c
@@ -1783,12 +1783,11 @@ static void
 event_once_cb(evutil_socket_t fd, short events, void *arg)
 {
        struct event_once *eonce = arg;
-       struct event_base *base = eonce->ev.ev_base;
 
        (*eonce->cb)(fd, events, eonce->arg);
-       EVBASE_ACQUIRE_LOCK(base, th_base_lock);
+       EVBASE_ACQUIRE_LOCK(eonce->ev.ev_base, th_base_lock);
        LIST_REMOVE(eonce, next_once);
-       EVBASE_RELEASE_LOCK(base, th_base_lock);
+       EVBASE_RELEASE_LOCK(eonce->ev.ev_base, th_base_lock);
        event_debug_unassign(&eonce->ev);
        mm_free(eonce);
 }