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 --- plugins/Variables/src/parse_miranda.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Variables/src/parse_miranda.cpp') diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index bd07c2c23d..d66ed6d3c1 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -154,7 +154,7 @@ static TCHAR* parseDBProfileName(ARGUMENTSINFO *ai) return NULL; TCHAR name[MAX_PATH]; - if (CallService(MS_DB_GETPROFILENAMET, SIZEOF(name), (LPARAM)name)) + if (CallService(MS_DB_GETPROFILENAMET, _countof(name), (LPARAM)name)) return NULL; return mir_tstrdup(name); @@ -166,7 +166,7 @@ static TCHAR* parseDBProfilePath(ARGUMENTSINFO *ai) return NULL; TCHAR path[MAX_PATH]; - if (CallService(MS_DB_GETPROFILEPATHT, SIZEOF(path), (LPARAM)path)) + if (CallService(MS_DB_GETPROFILEPATHT, _countof(path), (LPARAM)path)) return NULL; return mir_tstrdup(path); @@ -390,7 +390,7 @@ static TCHAR* parseMirandaPath(ARGUMENTSINFO *ai) ai->flags |= AIF_DONTPARSE; TCHAR path[MAX_PATH]; - if (GetModuleFileName(NULL, path, SIZEOF(path)) == 0) + if (GetModuleFileName(NULL, path, _countof(path)) == 0) return NULL; return mir_tstrdup(path); @@ -712,7 +712,7 @@ static TCHAR *parseMirDateString(ARGUMENTSINFO *ai) ai->flags |= AIF_DONTPARSE; TCHAR ret[128]; - return mir_tstrdup(TimeZone_ToStringT(time(NULL), _T("d s"), ret, SIZEOF(ret))); + return mir_tstrdup(TimeZone_ToStringT(time(NULL), _T("d s"), ret, _countof(ret))); } static TCHAR *parseMirandaCoreVar(ARGUMENTSINFO *ai) @@ -723,7 +723,7 @@ static TCHAR *parseMirandaCoreVar(ARGUMENTSINFO *ai) ai->flags |= AIF_DONTPARSE; TCHAR corevar[MAX_PATH]; - mir_sntprintf(corevar, SIZEOF(corevar), _T("%%%s%%"), ai->targv[0]); + mir_sntprintf(corevar, _countof(corevar), _T("%%%s%%"), ai->targv[0]); return Utils_ReplaceVarsT(corevar); } -- cgit v1.2.3