summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2018-03-06 20:24:07 +0300
committerKirill Volinsky <mataes2007@gmail.com>2018-03-07 12:54:58 +0300
commitbebafc42ab6199e86d4c2c901fac8d091bfffef0 (patch)
treef3961879845e89688c6628dccf1a3c9cd3ebb9b3 /include
parent7e9fef8a6ff35c63f9217fcc618d77f660e45245 (diff)
some fixes
Diffstat (limited to 'include')
-rw-r--r--include/m_string.h6
-rw-r--r--include/statusmodes.h2
2 files changed, 1 insertions, 7 deletions
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<DWORD>(size);
::CharToOemBuffA(pstrString, pstrString, dwSize);
}
static void ConvertToAnsi(_CharType* pstrString, size_t size)
{
- if (size > UINT_MAX)
- return;
-
DWORD dwSize = static_cast<DWORD>(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