mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 05:48:51 -04:00
be: add_event: use evutil_timerisset()
This commit is contained in:
parent
3160716f26
commit
a96b73b9fd
@ -972,7 +972,7 @@ bufferevent_generic_adj_timeouts_(struct bufferevent *bev)
|
|||||||
int
|
int
|
||||||
bufferevent_add_event_(struct event *ev, const struct timeval *tv)
|
bufferevent_add_event_(struct event *ev, const struct timeval *tv)
|
||||||
{
|
{
|
||||||
if (tv->tv_sec == 0 && tv->tv_usec == 0)
|
if (!evutil_timerisset(tv))
|
||||||
return event_add(ev, NULL);
|
return event_add(ev, NULL);
|
||||||
else
|
else
|
||||||
return event_add(ev, tv);
|
return event_add(ev, tv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user