summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src/irclib.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/IRCG/src/irclib.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src/irclib.cpp')
-rw-r--r--protocols/IRCG/src/irclib.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp
index 4b2b74112d..e9a8340119 100644
--- a/protocols/IRCG/src/irclib.cpp
+++ b/protocols/IRCG/src/irclib.cpp
@@ -234,7 +234,7 @@ bool CIrcProto::Connect(const CIrcSessionInfo& info)
CMString m_userID = GetWord(info.sUserID.c_str(), 0);
TCHAR szHostName[MAX_PATH];
- DWORD cbHostName = SIZEOF(szHostName);
+ DWORD cbHostName = _countof(szHostName);
GetComputerName(szHostName, &cbHostName);
CMString HostName = GetWord(szHostName, 0);
if (m_userID.IsEmpty())
@@ -289,7 +289,7 @@ int CIrcProto::NLSend(const TCHAR* fmt, ...)
va_start(marker, fmt);
TCHAR szBuf[1024 * 4];
- mir_vsntprintf(szBuf, SIZEOF(szBuf), fmt, marker);
+ mir_vsntprintf(szBuf, _countof(szBuf), fmt, marker);
va_end(marker);
char* buf = mir_t2a_cp(szBuf, getCodepage());
@@ -304,7 +304,7 @@ int CIrcProto::NLSend(const char* fmt, ...)
va_start(marker, fmt);
char szBuf[1024 * 4];
- int cbLen = mir_vsnprintf(szBuf, SIZEOF(szBuf), fmt, marker);
+ int cbLen = mir_vsnprintf(szBuf, _countof(szBuf), fmt, marker);
va_end(marker);
return NLSend((unsigned char*)szBuf, cbLen);