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/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp | |
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/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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);
}
|