From 642a6b2445dcb5afe84a7514c4bfbbfad52987d3 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Wed, 4 Jan 2023 16:27:27 +0100 Subject: [PATCH] Remove useless checks These are all truisms because of the valid range of the types. --- vncviewer/MonitorIndicesParameter.cxx | 3 --- win/rfb_win32/EventManager.cxx | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/vncviewer/MonitorIndicesParameter.cxx b/vncviewer/MonitorIndicesParameter.cxx index 7fabf85b..239a39f5 100644 --- a/vncviewer/MonitorIndicesParameter.cxx +++ b/vncviewer/MonitorIndicesParameter.cxx @@ -76,9 +76,6 @@ bool MonitorIndicesParameter::setParam(const char* value) int index; std::set indices; - if (strlen(value) < 0) - return false; - if (!parseIndices(value, &indices, true)) { vlog.error(_("Invalid configuration specified for %s"), name); return false; diff --git a/win/rfb_win32/EventManager.cxx b/win/rfb_win32/EventManager.cxx index 9e08b793..401a8ee2 100644 --- a/win/rfb_win32/EventManager.cxx +++ b/win/rfb_win32/EventManager.cxx @@ -95,7 +95,7 @@ BOOL EventManager::getMessage(MSG* msg, HWND hwnd, UINT minMsg, UINT maxMsg) { } else return GetMessage(msg, hwnd, minMsg, maxMsg); - if ((result >= WAIT_OBJECT_0) && (result < (WAIT_OBJECT_0 + eventCount))) { + if (result < (WAIT_OBJECT_0 + eventCount)) { // - An event was set - call the handler int index = result - WAIT_OBJECT_0; handlers[index]->processEvent(events[index]); -- 2.39.5