summaryrefslogtreecommitdiff
path: root/ev_epoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'ev_epoll.c')
-rw-r--r--ev_epoll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ev_epoll.c b/ev_epoll.c
index 7614ac5..4793212 100644
--- a/ev_epoll.c
+++ b/ev_epoll.c
@@ -81,10 +81,10 @@ epoll_poll (ev_tstamp timeout)
);
/* if the receive array was full, increase its size */
- if (eventcnt == eventmax)
+ if (expect_false (eventcnt == eventmax))
{
free (events);
- eventmax += eventmax >> 1;
+ eventmax = array_roundsize (events, eventmax << 1);
events = malloc (sizeof (struct epoll_event) * eventmax);
}
}