summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/modsettingenum.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/DbEditorPP/src/modsettingenum.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/DbEditorPP/src/modsettingenum.cpp')
-rw-r--r--plugins/DbEditorPP/src/modsettingenum.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp
index b6d90ff1b1..dc30d2f473 100644
--- a/plugins/DbEditorPP/src/modsettingenum.cpp
+++ b/plugins/DbEditorPP/src/modsettingenum.cpp
@@ -113,7 +113,7 @@ int enumResidentProc(const char *setting, DWORD, LPARAM)
char str[FLD_SIZE];
const char *end = strstr(setting, "/");
- if (end && (end - setting) < SIZEOF(str)) {
+ if (end && (end - setting) < _countof(str)) {
mir_strncpy(str, setting, end - setting + 1);
if (m_lResidentModules.getIndex(str) == -1)
m_lResidentModules.insert(mir_strdup(str));
@@ -152,9 +152,9 @@ int IsResidentSetting(const char *module, const char *setting)
if (!setting) return 1;
char str[2*FLD_SIZE];
- mir_strncpy(str, module, SIZEOF(str)-1);
+ mir_strncpy(str, module, _countof(str)-1);
mir_strcat(str, "/");
- mir_strncat(str, setting, SIZEOF(str));
+ mir_strncat(str, setting, _countof(str));
return m_lResidentSettings.getIndex(str) != -1;
}
@@ -244,9 +244,9 @@ int fixResidentSettings()
for (setting = SettingList.first; setting; setting = setting->next) {
- mir_strncpy(str, module->name, SIZEOF(str)-1);
+ mir_strncpy(str, module->name, _countof(str)-1);
mir_strcat(str, "/");
- mir_strncat(str, setting->name, SIZEOF(str));
+ mir_strncat(str, setting->name, _countof(str));
int idx = m_lResidentSettings.getIndex(str);
if (idx == -1)