}
/* Don't bust the limit here */
- if (size > poll_max_size) {
+ if (size > poll_max_size && poll_max_size != 0) {
size = poll_max_size;
}
goto error;
}
+ /*
+ * Since the returned events are set sequentially in the "events" structure
+ * we only need to return the epoll_wait value and iterate over it.
+ */
return ret;
error: