X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/4ebe9e295b974622f802229ca8e371ee6df9525a..fe7222913a6e42b65bfd92bc38479714316cfaf3:/ev_port.c?ds=sidebyside 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); } }