summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/MraIcons.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/MRA/src/MraIcons.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/MRA/src/MraIcons.cpp')
-rw-r--r--protocols/MRA/src/MraIcons.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp
index ee4ca32b7c..c50782741e 100644
--- a/protocols/MRA/src/MraIcons.cpp
+++ b/protocols/MRA/src/MraIcons.cpp
@@ -75,7 +75,7 @@ void InitXStatusIcons()
{
// load libs
TCHAR szBuff[MAX_FILEPATH];
- if (GetModuleFileName(NULL, szBuff, SIZEOF(szBuff))) {
+ if (GetModuleFileName(NULL, szBuff, _countof(szBuff))) {
LPWSTR lpwszFileName;
g_dwMirWorkDirPathLen = GetFullPathName(szBuff, MAX_FILEPATH, g_szMirWorkDirPath, &lpwszFileName);
if (g_dwMirWorkDirPathLen) {
@@ -84,7 +84,7 @@ void InitXStatusIcons()
// load xstatus icons lib
DWORD dwBuffLen;
- DWORD dwErrorCode = FindFile(g_szMirWorkDirPath, (DWORD)g_dwMirWorkDirPathLen, _T("xstatus_MRA.dll"), -1, szBuff, SIZEOF(szBuff), &dwBuffLen);
+ DWORD dwErrorCode = FindFile(g_szMirWorkDirPath, (DWORD)g_dwMirWorkDirPathLen, _T("xstatus_MRA.dll"), -1, szBuff, _countof(szBuff), &dwBuffLen);
if (dwErrorCode == NO_ERROR) {
g_hDLLXStatusIcons = LoadLibraryEx(szBuff, NULL, 0);
if (g_hDLLXStatusIcons) {
@@ -98,7 +98,7 @@ void InitXStatusIcons()
}
}
- GetModuleFileName((g_hDLLXStatusIcons != NULL) ? g_hDLLXStatusIcons : g_hInstance, szBuff, SIZEOF(szBuff));
+ GetModuleFileName((g_hDLLXStatusIcons != NULL) ? g_hDLLXStatusIcons : g_hInstance, szBuff, _countof(szBuff));
SKINICONDESC sid = { 0 };
sid.section.t = LPGENT("Protocols")_T("/")LPGENT("MRA")_T("/")LPGENT("Custom Status");
@@ -109,7 +109,7 @@ void InitXStatusIcons()
hXStatusAdvancedStatusIcons[0] = NULL;
for (DWORD i = 1; i < MRA_XSTATUS_COUNT+1; i++) {
char szBuff[MAX_PATH];
- mir_snprintf(szBuff, SIZEOF(szBuff), "mra_xstatus%ld", i);
+ mir_snprintf(szBuff, _countof(szBuff), "mra_xstatus%ld", i);
sid.pszName = szBuff;
int iCurIndex = i+IDI_XSTATUS1-1;
@@ -125,7 +125,7 @@ void DestroyXStatusIcons()
char szBuff[MAX_PATH];
for (DWORD i = 1; i < MRA_XSTATUS_COUNT+1; i++) {
- mir_snprintf(szBuff, SIZEOF(szBuff), "mra_xstatus%ld", i);
+ mir_snprintf(szBuff, _countof(szBuff), "mra_xstatus%ld", i);
IcoLib_RemoveIcon(szBuff);
}