[PATCH] shell32: Avoid an unneeded strlenW() call.

Francois Gouget fgouget at free.fr
Sat Dec 8 18:48:14 CST 2018


Signed-off-by: Francois Gouget <fgouget at free.fr>
---

Note that command is a buffer and cannot be NULL.

 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 aca02d74888..28f2e36f9a7 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? */
-- 
2.19.2



More information about the wine-devel mailing list