+ /* The fd was not in our set, return no error as with epoll. */
+ if (current->nb_fd == count) {
+ goto end;
+ }
+
+ /* No fd duplicate should be ever added into array. */
+ assert(current->nb_fd - 1 == count);
+ current->nb_fd = count;
+
+ /* Resize array if needed. */
+ new_size = 1U << utils_get_count_order_u32(current->nb_fd);
+ if (new_size != current->alloc_size && new_size >= current->init_size
+ && current->nb_fd != 0) {
+ ret = resize_poll_event(current, new_size);
+ if (ret < 0) {
+ goto error;
+ }
+ }
+