summaryrefslogtreecommitdiff
path: root/ev_epoll.c
diff options
context:
space:
mode:
authorroot <root>2007-11-02 11:02:23 +0000
committerroot <root>2007-11-02 11:02:23 +0000
commit9c3ea2c67ff2082780a7323fa5df445469faf0b4 (patch)
treea2a1dbc0c4b51a8f7e5c3214254206dd0d140147 /ev_epoll.c
parentdbf50c389aa715408820f52caa1c898ed1663bc3 (diff)
*** empty log message ***
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);
}
}