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/Gadu-Gadu/src/popups.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/Gadu-Gadu/src/popups.cpp')
-rw-r--r-- | protocols/Gadu-Gadu/src/popups.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Gadu-Gadu/src/popups.cpp b/protocols/Gadu-Gadu/src/popups.cpp index 9343f75bb5..ea440fb6b0 100644 --- a/protocols/Gadu-Gadu/src/popups.cpp +++ b/protocols/Gadu-Gadu/src/popups.cpp @@ -87,16 +87,16 @@ void GGPROTO::initpopups() puc.hIcon = CopyIcon(LoadIconEx("main", FALSE));
ReleaseIconEx("main", FALSE);
puc.iSeconds = 4;
- mir_sntprintf(szDescr, SIZEOF(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", m_szModuleName, "Notify");
+ mir_sntprintf(szDescr, _countof(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
+ mir_snprintf(szName, _countof(szName), "%s_%s", m_szModuleName, "Notify");
hPopupNotify = Popup_RegisterClass(&puc);
puc.colorBack = RGB(191, 0, 0); // Red
puc.colorText = RGB(255, 245, 225); // Yellow
puc.iSeconds = 60;
puc.hIcon = (HICON)LoadImage(NULL, IDI_WARNING, IMAGE_ICON, 0, 0, LR_SHARED);
- mir_sntprintf(szDescr, SIZEOF(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", m_szModuleName, "Error");
+ mir_sntprintf(szDescr, _countof(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
+ mir_snprintf(szName, _countof(szName), "%s_%s", m_szModuleName, "Error");
hPopupError = Popup_RegisterClass(&puc);
}
@@ -117,9 +117,9 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam) ppd.pszClassName = szName;
if (puData->flags & GG_POPUP_ERROR || puData->flags & GG_POPUP_WARNING)
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", gg->m_szModuleName, "Error");
+ mir_snprintf(szName, _countof(szName), "%s_%s", gg->m_szModuleName, "Error");
else
- mir_snprintf(szName, SIZEOF(szName), "%s_%s", gg->m_szModuleName, "Notify");
+ mir_snprintf(szName, _countof(szName), "%s_%s", gg->m_szModuleName, "Notify");
CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
return;
|