Lazily initialize max poll set size
[lttng-tools.git] / src / common / compat / compat-epoll.c
index 58f50cc94dd83e33448ca31ebdb2fd2594fee88a..9c2688d33e09c3c774b914b366226424504324e7 100644 (file)
@@ -76,8 +76,9 @@ int compat_epoll_create(struct lttng_poll_event *events, int size, int flags)
        }
 
        if (!poll_max_size) {
-               ERR("poll_max_size not initialized yet");
-               goto error;
+               if (lttng_poll_set_max_size()) {
+                       goto error;
+               }
        }
 
        /* Don't bust the limit here */
@@ -208,7 +209,6 @@ int compat_epoll_wait(struct lttng_poll_event *events, int timeout)
                ERR("Wrong arguments in compat_epoll_wait");
                goto error;
        }
-       assert(events->nb_fd >= 0);
 
        if (events->nb_fd == 0) {
                errno = EINVAL;
This page took 0.023428 seconds and 4 git commands to generate.