From 52ae826492f50f151138ed115faa5e0ac8c803ce Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Wed, 15 Feb 2017 00:44:41 -0500 Subject: [PATCH] unix: remove unused code in `uv__io_start` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code path in `uv__io_start` cannot be reached because `pevents` is always non-zero at that point. PR-URL: https://github.com/libuv/libuv/pull/1227 Reviewed-By: Saúl Ibarra Corretgé Reviewed-By: Santiago Gimeno Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis --- src/unix/core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/unix/core.c b/src/unix/core.c index 1ec549cc..9ef71349 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -839,13 +839,8 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) { * every tick of the event loop but the other backends allow us to * short-circuit here if the event mask is unchanged. */ - if (w->events == w->pevents) { - if (w->events == 0 && !QUEUE_EMPTY(&w->watcher_queue)) { - QUEUE_REMOVE(&w->watcher_queue); - QUEUE_INIT(&w->watcher_queue); - } + if (w->events == w->pevents) return; - } #endif if (QUEUE_EMPTY(&w->watcher_queue))