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 /plugins/helpers | |
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 'plugins/helpers')
-rw-r--r-- | plugins/helpers/gen_helpers.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp index dae6100000..575d8d203b 100644 --- a/plugins/helpers/gen_helpers.cpp +++ b/plugins/helpers/gen_helpers.cpp @@ -82,12 +82,12 @@ int AddDebugLogMessageA(const char* fmt, ...) va_list va;
va_start(va, fmt);
- mir_vsnprintf(szText, SIZEOF(szText), fmt, va);
+ mir_vsnprintf(szText, _countof(szText), fmt, va);
va_end(va);
#ifdef MODULENAME
- mir_snprintf(szFinal, SIZEOF(szFinal), "%s: %s", MODULENAME, szText);
+ mir_snprintf(szFinal, _countof(szFinal), "%s: %s", MODULENAME, szText);
#else
- strncpy(szFinal, szText, SIZEOF(szFinal));
+ strncpy(szFinal, szText, _countof(szFinal));
#endif
res = WriteToDebugLogA(szFinal);
@@ -103,12 +103,12 @@ int AddDebugLogMessage(const TCHAR* fmt, ...) va_list va;
va_start(va, fmt);
- mir_vsntprintf(tszText, SIZEOF(tszText), fmt, va);
+ mir_vsntprintf(tszText, _countof(tszText), fmt, va);
va_end(va);
#ifdef MODULENAME
- mir_sntprintf(tszFinal, SIZEOF(tszFinal), _T("%s: %s"), MODULENAME, tszText);
+ mir_sntprintf(tszFinal, _countof(tszFinal), _T("%s: %s"), MODULENAME, tszText);
#else
- _tcsncpy(tszFinal, tszText, SIZEOF(tszFinal));
+ _tcsncpy(tszFinal, tszText, _countof(tszFinal));
#endif
|