X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/4ebe9e295b974622f802229ca8e371ee6df9525a..7f61bc3d979ef53b867172664694f8fcf9e5bdd0:/ev_port.c diff --git a/ev_port.c b/ev_port.c index db3bae5..169181d 100644 --- a/ev_port.c +++ b/ev_port.c @@ -103,7 +103,7 @@ port_poll (EV_P_ ev_tstamp timeout) if (expect_false (nget == port_eventmax)) { ev_free (port_events); - port_eventmax = array_roundsize (port_event_t, port_eventmax << 1); + port_eventmax = array_nextsize (sizeof (port_event_t), port_eventmax, port_eventmax + 1); port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax); } }