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/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp') diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 7093d5770f..4f35dc0b5d 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -61,7 +61,7 @@ static void InitAlteredPlacesBar() dwFolderID = 17; RegSetValueEx(hkPlacesBar, _T("Place2"), 0, REG_DWORD, (PBYTE)&dwFolderID, sizeof(DWORD)); // Miranda's installation path - GetModuleFileNameA(GetModuleHandleA("mir_app.dll"), szMirandaPath, SIZEOF(szMirandaPath)); + GetModuleFileNameA(GetModuleHandleA("mir_app.dll"), szMirandaPath, _countof(szMirandaPath)); p = mir_strrchr(szMirandaPath, '\\'); if (p) { @@ -69,7 +69,7 @@ static void InitAlteredPlacesBar() } // Miranda's profile path - if (!CallService(MS_DB_GETPROFILEPATH, SIZEOF(szProfilePath), (LPARAM)szProfilePath)) + if (!CallService(MS_DB_GETPROFILEPATH, _countof(szProfilePath), (LPARAM)szProfilePath)) { // only add if different from profile path RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (PBYTE)szProfilePath, (DWORD)mir_strlen(szProfilePath) + 1); @@ -114,7 +114,7 @@ static LRESULT CALLBACK PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wPara // miranda button switch (tbb->idCommand) { case 41063: - mir_tstrncpy(szBtnText, TranslateT("Miranda NG"), SIZEOF(szBtnText)); + mir_tstrncpy(szBtnText, TranslateT("Miranda NG"), _countof(szBtnText)); iString = SendMessage(hWnd, TB_ADDSTRING, NULL, (LPARAM)szBtnText); if (iString != -1) tbb->iString = iString; // set tooltip @@ -204,7 +204,7 @@ static void GetInitialDir(LPSTR pszInitialDir) szRelative[0] = 0; // is some standard path defined - if (!db_get_static(0, MODNAME, "vCardPath", szRelative, SIZEOF(szRelative))) { + if (!db_get_static(0, MODNAME, "vCardPath", szRelative, _countof(szRelative))) { if (!PathToAbsolute(szRelative, pszInitialDir)) mir_strcpy(pszInitialDir, szRelative); } -- cgit v1.2.3