From 2cff59ed5cc4ce1e76577e8e16398b75aacd7fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Tue, 22 Dec 2015 19:30:57 +0100 Subject: [PATCH] shell32: Minor cleanup of SHELL_execute (Clang). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Hentschel Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/shell32/shlexec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index ba83a571a25..5fcbe03e58f 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -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