summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/main.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 /plugins/AVS/src/main.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 'plugins/AVS/src/main.cpp')
-rw-r--r--plugins/AVS/src/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index d551874527..6ed85901fd 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -142,10 +142,10 @@ static void LoadProtoInfo(PROTOCOLDESCRIPTOR *proto)
return;
char protoName[MAX_PATH];
- mir_snprintf(protoName, SIZEOF(protoName), "Global avatar for %s accounts", proto->szName);
+ mir_snprintf(protoName, _countof(protoName), "Global avatar for %s accounts", proto->szName);
TCHAR protoNameTmp[MAX_PATH];
- mir_sntprintf(protoNameTmp, SIZEOF(protoNameTmp), TranslateT("Global avatar for %s accounts"), _A2T(proto->szName));
+ mir_sntprintf(protoNameTmp, _countof(protoNameTmp), TranslateT("Global avatar for %s accounts"), _A2T(proto->szName));
protoPicCacheEntry *pce = new protoPicCacheEntry;
if (CreateAvatarInCache(0, pce, protoName) != 1)
db_unset(0, PPICT_MODULE, protoName);
@@ -323,7 +323,7 @@ void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bm
static int ModulesLoaded(WPARAM, LPARAM)
{
TCHAR szEventName[100];
- mir_sntprintf(szEventName, SIZEOF(szEventName), _T("avs_loaderthread_%d"), GetCurrentThreadId());
+ mir_sntprintf(szEventName, _countof(szEventName), _T("avs_loaderthread_%d"), GetCurrentThreadId());
hLoaderEvent = CreateEvent(NULL, TRUE, FALSE, szEventName);
SetThreadPriority(mir_forkthread(PicLoader, 0), THREAD_PRIORITY_IDLE);
@@ -381,7 +381,7 @@ static int LoadAvatarModule()
InitServices();
InitPolls();
- _tcsncpy_s(g_szDataPath, SIZEOF(g_szDataPath), VARST(_T("%miranda_userdata%\\")), _TRUNCATE);
+ _tcsncpy_s(g_szDataPath, _countof(g_szDataPath), VARST(_T("%miranda_userdata%\\")), _TRUNCATE);
_tcslwr(g_szDataPath);
return 0;
}