There is really no need to increment "n" if we never read the value. The
do-while() loop overwrites the value before it is read the first time.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
count = epoll_wait(loop->epoll_fd, ep, ARRAY_LENGTH(ep), timeout);
if (count < 0)
return -1;
- n = 0;
+
for (i = 0; i < count; i++) {
source = ep[i].data.ptr;
if (source->fd != -1)
- n += source->interface->dispatch(source, &ep[i]);
+ source->interface->dispatch(source, &ep[i]);
}
wl_event_loop_process_destroy_list(loop);