X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/408214e3dfe1ba40783a70c02d98b92738bdb979..c3a3f33d0d4ad477f0b40f4ea649d6ac523a45fa:/ev_port.c diff --git a/ev_port.c b/ev_port.c index e6555bb..169181d 100644 --- a/ev_port.c +++ b/ev_port.c @@ -103,12 +103,12 @@ 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); } } -static int +int inline_size port_init (EV_P_ int flags) { /* Initalize the kernel queue */ @@ -127,15 +127,13 @@ port_init (EV_P_ int flags) return EVBACKEND_PORT; } -static void +void inline_size port_destroy (EV_P) { - close (backend_fd); - ev_free (port_events); } -static void +void inline_size port_fork (EV_P) { close (backend_fd);