Commit 2cff59ed authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

shell32: Minor cleanup of SHELL_execute (Clang).

parent 798fd5bf
......@@ -1565,7 +1565,6 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
WCHAR *wszApplicationName, *wszParameters, *wszDir, *wcmd;
DWORD dwApplicationNameLen = MAX_PATH+2;
DWORD parametersLen = sizeof(parametersBuffer) / sizeof(WCHAR);
DWORD dirLen = sizeof(dirBuffer) / sizeof(WCHAR);
DWORD wcmdLen = sizeof(wcmdBuffer) / sizeof(WCHAR);
DWORD len;
SHELLEXECUTEINFOW sei_tmp; /* modifiable copy of SHELLEXECUTEINFO struct */
......@@ -1625,11 +1624,8 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
if (sei_tmp.lpDirectory)
{
len = lstrlenW(sei_tmp.lpDirectory) + 1;
if (len > dirLen)
{
if (len > sizeof(dirBuffer) / sizeof(WCHAR))
wszDir = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
dirLen = len;
}
strcpyW(wszDir, sei_tmp.lpDirectory);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment