be: add_event: use evutil_timerisset()

This commit is contained in:
Azat Khuzhin 2015-11-05 17:35:17 +03:00
parent 3160716f26
commit a96b73b9fd

View File

@ -972,7 +972,7 @@ bufferevent_generic_adj_timeouts_(struct bufferevent *bev)
int
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);
else
return event_add(ev, tv);