From bebafc42ab6199e86d4c2c901fac8d091bfffef0 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 6 Mar 2018 20:24:07 +0300 Subject: some fixes --- include/m_string.h | 6 ------ include/statusmodes.h | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'include') diff --git a/include/m_string.h b/include/m_string.h index 1077298bcb..e81376da1f 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -436,18 +436,12 @@ public: static void ConvertToOem(_CharType* pstrString, size_t size) { - if (size > UINT_MAX) { - return; - } DWORD dwSize = static_cast(size); ::CharToOemBuffA(pstrString, pstrString, dwSize); } static void ConvertToAnsi(_CharType* pstrString, size_t size) { - if (size > UINT_MAX) - return; - DWORD dwSize = static_cast(size); ::OemToCharBuffA(pstrString, pstrString, dwSize); } diff --git a/include/statusmodes.h b/include/statusmodes.h index 1eb49e11e8..993b75aabc 100644 --- a/include/statusmodes.h +++ b/include/statusmodes.h @@ -40,7 +40,7 @@ __forceinline bool IsStatusConnecting(int iStatus) return iStatus >= ID_STATUS_CONNECTING && iStatus < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES; } #else - #define IsStatusConnecting(X) (X >= ID_STATUS_CONNECTING && X < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES) + #define IsStatusConnecting(X) ((X) >= ID_STATUS_CONNECTING && (X) < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES) #endif #define ID_STATUS_OFFLINE 40071 -- cgit v1.2.3