mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Make scope of the timeval structure cleaner in event_base_loop()
Fixes: https://github.com/libevent/libevent/issues/1741
This commit is contained in:
parent
d6dbd7f818
commit
6b7fb78c99
3
event.c
3
event.c
@ -1975,7 +1975,6 @@ int
|
||||
event_base_loop(struct event_base *base, int flags)
|
||||
{
|
||||
const struct eventop *evsel = base->evsel;
|
||||
struct timeval tv;
|
||||
struct timeval *tv_p;
|
||||
int res, done, retval = 0;
|
||||
struct evwatch_prepare_cb_info prepare_info;
|
||||
@ -2009,6 +2008,8 @@ event_base_loop(struct event_base *base, int flags)
|
||||
base->event_gotterm = base->event_break = 0;
|
||||
|
||||
while (!done) {
|
||||
struct timeval tv;
|
||||
|
||||
base->event_continue = 0;
|
||||
base->n_deferreds_queued = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user