=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: shell32: Minor cleanup of SHELL_execute (Clang).

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 22 14:06:52 CST 2015


Module: wine
Branch: master
Commit: 2cff59ed5cc4ce1e76577e8e16398b75aacd7fb2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2cff59ed5cc4ce1e76577e8e16398b75aacd7fb2

Author: André Hentschel <nerv at dawncrow.de>
Date:   Tue Dec 22 19:30:57 2015 +0100

shell32: Minor cleanup of SHELL_execute (Clang).

Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 ba83a57..5fcbe03 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




More information about the wine-cvs mailing list