shell32: Minor cleanup of SHELL_execute (Clang).

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
André Hentschel 2015-12-22 19:30:57 +01:00 committed by Alexandre Julliard
parent 798fd5bf27
commit 2cff59ed5c

View file

@ -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