X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/4ebe9e295b974622f802229ca8e371ee6df9525a..1ef940ed393da8f8d74505196399215d6bb21016:/ev_epoll.c diff --git a/ev_epoll.c b/ev_epoll.c index 54a4ccb..38fd304 100644 --- a/ev_epoll.c +++ b/ev_epoll.c @@ -74,7 +74,7 @@ epoll_poll (EV_P_ ev_tstamp timeout) if (expect_false (eventcnt == epoll_eventmax)) { ev_free (epoll_events); - epoll_eventmax = array_roundsize (epoll_events, epoll_eventmax << 1); + epoll_eventmax = array_nextsize (sizeof (struct epoll_event), epoll_eventmax, epoll_eventmax + 1); epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); } }