mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
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:
parent
7fafa994a4
commit
397a0c6ada
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
count = epoll_wait(loop->epoll_fd, ep, ARRAY_LENGTH(ep), timeout);
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
return -1;
|
return -1;
|
||||||
n = 0;
|
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
source = ep[i].data.ptr;
|
source = ep[i].data.ptr;
|
||||||
if (source->fd != -1)
|
if (source->fd != -1)
|
||||||
n += source->interface->dispatch(source, &ep[i]);
|
source->interface->dispatch(source, &ep[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_event_loop_process_destroy_list(loop);
|
wl_event_loop_process_destroy_list(loop);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue