summaryrefslogtreecommitdiffstats
path: root/src/event-loop.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-09-08 17:47:15 +0200
committerKristian Høgsberg <krh@bitplanet.net>2012-09-10 21:28:34 -0400
commit397a0c6ada56e4330ebf2bc662010ca8d32a2c73 (patch)
tree22bac327b43ac9d7f0953c4a5ba848f9e9f55997 /src/event-loop.c
parentcursor: add cursor.pcf and extraction program (diff)
downloadwayland-397a0c6ada56e4330ebf2bc662010ca8d32a2c73.tar
wayland-397a0c6ada56e4330ebf2bc662010ca8d32a2c73.tar.gz
wayland-397a0c6ada56e4330ebf2bc662010ca8d32a2c73.tar.bz2
wayland-397a0c6ada56e4330ebf2bc662010ca8d32a2c73.tar.lz
wayland-397a0c6ada56e4330ebf2bc662010ca8d32a2c73.tar.xz
wayland-397a0c6ada56e4330ebf2bc662010ca8d32a2c73.tar.zst
wayland-397a0c6ada56e4330ebf2bc662010ca8d32a2c73.zip
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>
Diffstat (limited to 'src/event-loop.c')
-rw-r--r--src/event-loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event-loop.c b/src/event-loop.c
index a839daf..df4b8b8 100644
--- a/src/event-loop.c
+++ b/src/event-loop.c
@@ -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);