From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Sametime/src/sametime_proto.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/Sametime/src/sametime_proto.cpp') 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); } -- cgit v1.2.3