Author: hbelusca
Date: Sat Jun 4 22:51:19 2016
New Revision: 71521
URL:
http://svn.reactos.org/svn/reactos?rev=71521&view=rev
Log:
[EXPLORER]: Use _countof where needed.
Modified:
trunk/reactos/base/shell/explorer/startmnucust.cpp
Modified: trunk/reactos/base/shell/explorer/startmnucust.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/startm…
==============================================================================
--- trunk/reactos/base/shell/explorer/startmnucust.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/startmnucust.cpp [iso-8859-1] Sat Jun 4 22:51:19
2016
@@ -28,7 +28,7 @@
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 @@
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));