diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/Sametime/src/sametime_proto.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (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/Sametime/src/sametime_proto.cpp')
-rw-r--r-- | protocols/Sametime/src/sametime_proto.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 446f477672..9003bfbe21 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -15,7 +15,7 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam {
// Register m_hNetlibUser user
TCHAR name[128];
- mir_sntprintf(name, SIZEOF(name), TranslateT("%s connection"), m_tszUserName);
+ mir_sntprintf(name, _countof(name), TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
nlu.flags = NUF_TCHAR | NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS;
@@ -45,7 +45,7 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam RegisterPopups();
InitAwayMsg();
- mir_snprintf(szProtoGroups, SIZEOF(szProtoGroups), "%s_GROUPS", m_szModuleName);
+ mir_snprintf(szProtoGroups, _countof(szProtoGroups), "%s_GROUPS", m_szModuleName);
m_iStatus = ID_STATUS_OFFLINE;
previous_status = ID_STATUS_OFFLINE;
@@ -177,7 +177,7 @@ HANDLE CSametimeProto::SearchBasic(const TCHAR* id) HWND CSametimeProto::SearchAdvanced(HWND owner)
{
TCHAR buf[512];
- if (GetDlgItemText(owner, IDC_EDIT1, buf, SIZEOF(buf))) {
+ if (GetDlgItemText(owner, IDC_EDIT1, buf, _countof(buf))) {
debugLog(_T("CSametimeProto::SearchAdvanced() buf:len=[%d]"), buf == NULL ? -1 : mir_tstrlen(buf));
return (HWND)SearchForUser(T2Utf(buf), TRUE);
}
|