event-loop: remove dead code

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>
This commit is contained in:
David Herrmann 2012-09-08 17:47:15 +02:00 committed by Kristian Høgsberg
parent 7fafa994a4
commit 397a0c6ada

View file

@ -403,11 +403,11 @@ wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout)
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);