summaryrefslogtreecommitdiff
path: root/protocols/Sametime/src/utils.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/Sametime/src/utils.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/Sametime/src/utils.cpp')
-rw-r--r--protocols/Sametime/src/utils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp
index 1d464b16a1..8bf46c72d1 100644
--- a/protocols/Sametime/src/utils.cpp
+++ b/protocols/Sametime/src/utils.cpp
@@ -40,8 +40,8 @@ void CSametimeProto::RegisterPopups()
puc.ptszDescription = szDescr;
puc.pszName = szName;
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", m_szModuleName, "Notify");
- mir_sntprintf(szDescr, SIZEOF(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Notification"));
+ mir_snprintf(szName, _countof(szName), "%s_%s", m_szModuleName, "Notify");
+ mir_sntprintf(szDescr, _countof(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Notification"));
puc.hIcon = CopyIcon(LoadIconEx("notify", FALSE));
ReleaseIconEx("notify", FALSE);
puc.iSeconds = 8;
@@ -49,8 +49,8 @@ void CSametimeProto::RegisterPopups()
puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
hPopupNotify = Popup_RegisterClass(&puc);
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", m_szModuleName, "Error");
- mir_sntprintf(szDescr, SIZEOF(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
+ mir_snprintf(szName, _countof(szName), "%s_%s", m_szModuleName, "Error");
+ mir_sntprintf(szDescr, _countof(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
puc.hIcon = CopyIcon(LoadIconEx("error", FALSE));
ReleaseIconEx("error", FALSE);
puc.iSeconds = 10;
@@ -89,9 +89,9 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam)
ppd.ptszTitle = puData->title;
ppd.ptszText = puData->text;
if (puData->flag == SAMETIME_POPUP_ERROR)
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", proto->m_szModuleName, "Error");
+ mir_snprintf(szName, _countof(szName), "%s_%s", proto->m_szModuleName, "Error");
else
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", proto->m_szModuleName, "Notify");
+ mir_snprintf(szName, _countof(szName), "%s_%s", proto->m_szModuleName, "Notify");
ppd.pszClassName = szName;
CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
}