From f469e143fc4348475912941e8172cb8646375011 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Mon, 17 Sep 2018 16:35:22 +0500 Subject: [PATCH] src/Cedar/Client.c: remove not needed condition inspired by coverity (however, coverity does not see an issue here) --- src/Cedar/Client.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/Cedar/Client.c b/src/Cedar/Client.c index 1c55a467..ecc14612 100644 --- a/src/Cedar/Client.c +++ b/src/Cedar/Client.c @@ -1869,24 +1869,21 @@ BEGIN_LISTENER: // If the port cannot be opened if (cn_next_allow <= Tick64()) { - if (cursor_changed || cn_listener->Halt) + if (cursor_changed) { - if (cursor_changed) - { - // It can be judged to have the rights to open the port - // since the mouse cursor is moving. - // So, take over the port which is owned by other process forcibly - CncReleaseSocket(); - } + // It can be judged to have the rights to open the port + // since the mouse cursor is moving. + // So, take over the port which is owned by other process forcibly + CncReleaseSocket(); + } - if (cn_listener->Halt) - { - ReleaseListener(cn_listener); - cn_listener = NULL; + if (cn_listener->Halt) + { + ReleaseListener(cn_listener); + cn_listener = NULL; - Unlock(cn_listener_lock); - goto BEGIN_LISTENER; - } + Unlock(cn_listener_lock); + goto BEGIN_LISTENER; } } }