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/DbEditorPP/src/modsettingenum.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/DbEditorPP/src/modsettingenum.cpp') 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) -- cgit v1.2.3