summaryrefslogtreecommitdiff
path: root/event.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-05-09 10:50:07 -0400
committerNick Mathewson <nickm@torproject.org>2012-05-09 12:06:00 -0400
commit581b5beb98f45ec73ade6c8026f4fadef4325d4b (patch)
treecd14a95246da657bc1bfa246f48e001d16086292 /event.c
parentc46cb9c3a2ab8256fc1ae8035c4d967e16b69c04 (diff)
downloadlibevent-581b5beb98f45ec73ade6c8026f4fadef4325d4b.tar.gz
Give event_base_process_active a single exit path
Diffstat (limited to 'event.c')
-rw-r--r--event.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/event.c b/event.c
index 616ad9da..2080d256 100644
--- a/event.c
+++ b/event.c
@@ -1533,8 +1533,7 @@ event_process_active(struct event_base *base)
c = event_process_active_single_queue(base, activeq,
maxcb, endtime);
if (c < 0) {
- base->event_running_priority = -1;
- return -1;
+ goto done;
} else if (c > 0)
break; /* Processed a real event; do not
* consider lower-priority events */
@@ -1543,7 +1542,9 @@ event_process_active(struct event_base *base)
}
}
+done:
base->event_running_priority = -1;
+
return c;
}