mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[EXPLORER]: Use _countof where needed.
svn path=/trunk/; revision=71521
This commit is contained in:
parent
1b3d6dfdc1
commit
a3fdbc7eca
1 changed files with 3 additions and 3 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue