shell32: Remove an unneeded local variable initialization.

Francois Gouget fgouget at free.fr
Fri Jan 26 11:23:57 CST 2007


---

This is certainly a matter of taste. I find it more readable to return 
NULL when we know that's what we want, rather than hide that fact behind 
a variable.

 dlls/shell32/shelllink.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shell32/shelllink.c b/dlls/shell32/shelllink.c
index a27b957..8a3d69d 100644
--- a/dlls/shell32/shelllink.c
+++ b/dlls/shell32/shelllink.c
@@ -2483,12 +2483,12 @@ ShellLink_QueryContextMenu( IContextMenu* iface, HMENU hmenu, UINT indexMenu,
 static LPWSTR
 shelllink_get_msi_component_path( LPWSTR component )
 {
-    LPWSTR path = NULL;
+    LPWSTR path;
     DWORD r, sz = 0;
 
     r = CommandLineFromMsiDescriptor( component, NULL, &sz );
     if (r != ERROR_SUCCESS)
-         return path;
+         return NULL;
 
     sz++;
     path = HeapAlloc( GetProcessHeap(), 0, sz*sizeof(WCHAR) );
-- 
1.4.4.3



More information about the wine-patches mailing list