Francois Gouget : shell32: Avoid an unneeded strlenW() call.

Alexandre Julliard julliard at winehq.org
Mon Dec 10 15:46:03 CST 2018


Module: wine
Branch: master
Commit: 76bc23d8c6c1b2857cb7a4d14c5931094a12a82a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=76bc23d8c6c1b2857cb7a4d14c5931094a12a82a

Author: Francois Gouget <fgouget at free.fr>
Date:   Sun Dec  9 01:48:14 2018 +0100

shell32: Avoid an unneeded strlenW() call.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/shlexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
index aca02d7..28f2e36 100644
--- a/dlls/shell32/shlexec.c
+++ b/dlls/shell32/shlexec.c
@@ -736,7 +736,7 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb,
 	extension++;
 	if (GetProfileStringW(wExtensions, extension, wszEmpty, command, ARRAY_SIZE(command)) > 0)
         {
-            if (strlenW(command) != 0)
+            if (*command)
             {
                 strcpyW(lpResult, command);
                 tok = strchrW(lpResult, '^'); /* should be ^.extension? */




More information about the wine-cvs mailing list