From a3fdbc7eca3ad3950d5827684fb561eebcc4e219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 4 Jun 2016 22:51:19 +0000 Subject: [PATCH] [EXPLORER]: Use _countof where needed. svn path=/trunk/; revision=71521 --- reactos/base/shell/explorer/startmnucust.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/base/shell/explorer/startmnucust.cpp b/reactos/base/shell/explorer/startmnucust.cpp index 7343b5c143f..e64240bbbef 100644 --- a/reactos/base/shell/explorer/startmnucust.cpp +++ b/reactos/base/shell/explorer/startmnucust.cpp @@ -28,7 +28,7 @@ VOID OnAddStartMenuItems(HWND hDlg) if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_STARTMENU, NULL, 0, szPath))) { WCHAR szCommand[MAX_PATH] = L"appwiz.cpl,NewLinkHere "; - if (SUCCEEDED(StringCchCatW(szCommand, MAX_PATH, szPath))) + if (SUCCEEDED(StringCchCatW(szCommand, _countof(szCommand), szPath))) ShellExecuteW(hDlg, L"open", L"rundll32.exe", szCommand, NULL, SW_SHOWNORMAL); } } @@ -51,11 +51,11 @@ VOID OnClearRecentItems() if (SUCCEEDED(SHGetFolderPathW(NULL, CSIDL_RECENT, NULL, 0, szPath))) { - StringCchPrintfW(szFile,MAX_PATH, L"%s\\*.*", szPath); + StringCchPrintfW(szFile, _countof(szFile), L"%s\\*.*", szPath); hPath = FindFirstFileW(szFile, &info); do { - StringCchPrintfW(szFile,MAX_PATH, L"%s\\%s", szPath, info.cFileName); + StringCchPrintfW(szFile, _countof(szFile), L"%s\\%s", szPath, info.cFileName); DeleteFileW(szFile); } while (FindNextFileW(hPath, &info));