Commit 90c3822b authored by Simon Kelley's avatar Simon Kelley

Grow pollfds array exponentially.

parent c895a062
......@@ -102,7 +102,8 @@ void poll_listen(int fd, short event)
{
/* Array too small, extend. */
struct pollfd *new;
arrsize += 64;
arrsize = (arrsize == 0) ? 64 : arrsize * 2;
if (!(new = whine_malloc(arrsize * sizeof(struct pollfd))))
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment