summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-11-13 20:12:58 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-11-13 20:12:58 +0000
commit0556f99729354666e6a08e0b14f332d7ed3f64ef (patch)
treef90c2012dc3a217c7a84c9276d4101215867847d
parentca9e826e27ec51c2cff31545204bb462cdd9fb63 (diff)
one more part not needed checks
git-svn-id: http://svn.miranda-ng.org/main/trunk@10985 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/core/miranda.cpp2
-rw-r--r--src/modules/clist/clcmsgs.cpp8
-rw-r--r--src/modules/netlib/netlib.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/core/miranda.cpp b/src/core/miranda.cpp
index efe76924ef..d115105c35 100644
--- a/src/core/miranda.cpp
+++ b/src/core/miranda.cpp
@@ -253,7 +253,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR cmdLine, int)
DWORD rc;
BOOL dying = FALSE;
rc = MsgWaitForMultipleObjectsEx(waitObjectCount, hWaitObjects, INFINITE, QS_ALLINPUT, MWMO_ALERTABLE);
- if (rc >= WAIT_OBJECT_0 && rc < WAIT_OBJECT_0 + waitObjectCount) {
+ if (rc < WAIT_OBJECT_0 + waitObjectCount) {
rc -= WAIT_OBJECT_0;
CallService(pszWaitServices[rc], (WPARAM)hWaitObjects[rc], 0);
}
diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp
index a3d477c871..c2bfae6ae4 100644
--- a/src/modules/clist/clcmsgs.cpp
+++ b/src/modules/clist/clcmsgs.cpp
@@ -174,7 +174,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
return (LRESULT)dat->himlExtraColumns;
case CLM_GETFONT:
- if (wParam < 0 || wParam > FONTID_MAX)
+ if (wParam > FONTID_MAX)
return 0;
return (LRESULT)dat->fontInfo[wParam].hFont;
@@ -301,7 +301,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
}
case CLM_GETTEXTCOLOR:
- if (wParam < 0 || wParam > FONTID_MAX)
+ if (wParam > FONTID_MAX)
return 0;
return (LRESULT)dat->fontInfo[wParam].colour;
@@ -390,7 +390,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
break;
case CLM_SETFONT:
- if (HIWORD(lParam) < 0 || HIWORD(lParam) > FONTID_MAX)
+ if (HIWORD(lParam) > FONTID_MAX)
return 0;
dat->fontInfo[HIWORD(lParam)].hFont = (HFONT) wParam;
@@ -457,7 +457,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
break;
case CLM_SETTEXTCOLOR:
- if (wParam < 0 || wParam > FONTID_MAX)
+ if (wParam > FONTID_MAX)
break;
dat->fontInfo[wParam].colour = lParam;
break;
diff --git a/src/modules/netlib/netlib.cpp b/src/modules/netlib/netlib.cpp
index 64c42a575a..320876ff20 100644
--- a/src/modules/netlib/netlib.cpp
+++ b/src/modules/netlib/netlib.cpp
@@ -290,7 +290,7 @@ INT_PTR NetlibCloseHandle(WPARAM wParam, LPARAM)
waitHandles[2] = nlc->ncsRecv.hMutex;
waitHandles[3] = nlc->ncsSend.hMutex;
waitResult = WaitForMultipleObjects(SIZEOF(waitHandles), waitHandles, TRUE, INFINITE);
- if (waitResult<WAIT_OBJECT_0 || waitResult >= WAIT_OBJECT_0 + SIZEOF(waitHandles)) {
+ if (waitResult >= WAIT_OBJECT_0 + SIZEOF(waitHandles)) {
ReleaseMutex(hConnectionHeaderMutex);
SetLastError(ERROR_INVALID_PARAMETER); //already been closed
return 0;