summaryrefslogtreecommitdiff
path: root/ev_kqueue.c
diff options
context:
space:
mode:
authorroot <root>2007-12-05 13:54:36 +0000
committerroot <root>2007-12-05 13:54:36 +0000
commit8553fca83a98588576f88cd1b1942ae6d3d6ab43 (patch)
tree335c64f6bf14e5018fa77234e83e35212f0c2bda /ev_kqueue.c
parent614930116ff2c76f9954eee0cf4c5194ee4204e0 (diff)
*** empty log message ***rel-1_6
Diffstat (limited to 'ev_kqueue.c')
-rw-r--r--ev_kqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ev_kqueue.c b/ev_kqueue.c
index afd3f9c..4fd649f 100644
--- a/ev_kqueue.c
+++ b/ev_kqueue.c
@@ -83,7 +83,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
if (kqueue_changecnt > kqueue_eventmax)
{
ev_free (kqueue_events);
- kqueue_eventmax = array_roundsize (struct kevent, kqueue_changecnt);
+ kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_changecnt);
kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax);
}
@@ -137,7 +137,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout)
if (expect_false (res == kqueue_eventmax))
{
ev_free (kqueue_events);
- kqueue_eventmax = array_roundsize (struct kevent, kqueue_eventmax << 1);
+ kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_eventmax + 1);
kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax);
}
}