Remove dead code in SHELL_FindExecutable()
Francois Gouget
fgouget at codeweavers.com
Thu Jun 15 11:29:29 CDT 2006
Changelog:
* dlls/shell32/shlexec.c
Francois Gouget <fgouget at codeweavers.com>
SHELL_FindExecutable() already checks that lpOperation is non NULL
so there is no need to handle the NULL case a few lines down.
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/shell32/shlexec.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlexec.c,v
retrieving revision 1.85
diff -u -p -r1.85 shlexec.c
--- dlls/shell32/shlexec.c 23 May 2006 12:48:39 -0000 1.85
+++ dlls/shell32/shlexec.c 15 Jun 2006 16:26:33 -0000
@@ -607,38 +607,9 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath
if (*filetype)
{
- if (lpOperation)
- {
- /* pass the operation string to SHELL_FindExecutableByOperation() */
- filetype[filetypelen] = '\0';
- retval = SHELL_FindExecutableByOperation(lpPath, lpFile, lpOperation, key, filetype, command, sizeof(command));
- }
- else
- {
- WCHAR operation[MAX_PATH];
- HKEY hkey;
-
- /* Looking for ...buffer\shell\<operation>\command */
- strcatW(filetype, wszShell);
-
- /* enumerate the operation subkeys in the registry and search for one with an associated command */
- if (RegOpenKeyW(HKEY_CLASSES_ROOT, filetype, &hkey) == ERROR_SUCCESS)
- {
- int idx = 0;
- for(;; ++idx)
- {
- if (RegEnumKeyW(hkey, idx, operation, MAX_PATH) != ERROR_SUCCESS)
- break;
-
- filetype[filetypelen] = '\0';
- retval = SHELL_FindExecutableByOperation(lpPath, lpFile, operation, key, filetype, command, sizeof(command));
-
- if (retval > 32)
- break;
- }
- RegCloseKey(hkey);
- }
- }
+ /* pass the operation string to SHELL_FindExecutableByOperation() */
+ filetype[filetypelen] = '\0';
+ retval = SHELL_FindExecutableByOperation(lpPath, lpFile, lpOperation, key, filetype, command, sizeof(command));
if (retval > 32)
{
More information about the wine-patches
mailing list