shell32: Remove uninitialized and superfluous struct

Andrew Talbot andrew.talbot at talbotville.com
Mon Mar 23 17:18:47 CDT 2009


The struct "ofs" is not being initialized and seems to be unnecessary.

-- Andy.
---
Changelog:
    shell32: Remove uninitialized and superfluous struct.

diff --git a/dlls/shell32/shell.c b/dlls/shell32/shell.c
index 7edc97b..67bdc01 100644
--- a/dlls/shell32/shell.c
+++ b/dlls/shell32/shell.c
@@ -189,7 +189,6 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
 {
     HGLOBAL16 hRet = 0;
     HICON16 *RetPtr = NULL;
-    OFSTRUCT ofs;
 
 	TRACE("(%04x,file %s,start %d,extract %d\n",
 		       hInstance, lpszExeFileName, nIconIndex, n);
@@ -202,7 +201,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
 
 	if (nIconIndex == (UINT16)-1)  /* get number of icons */
 	{
-	  RetPtr[0] = PrivateExtractIconsA(ofs.szPathName, 0, 0, 0, NULL, NULL, 0, LR_DEFAULTCOLOR);
+	  RetPtr[0] = PrivateExtractIconsA(lpszExeFileName, 0, 0, 0, NULL, NULL, 0, LR_DEFAULTCOLOR);
 	}
 	else
 	{
@@ -210,7 +209,7 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
 	  HICON *icons;
 
 	  icons = HeapAlloc(GetProcessHeap(), 0, n * sizeof(*icons));
-	  ret = PrivateExtractIconsA(ofs.szPathName, nIconIndex,
+	  ret = PrivateExtractIconsA(lpszExeFileName, nIconIndex,
 	                             GetSystemMetrics(SM_CXICON),
 	                             GetSystemMetrics(SM_CYICON),
 	                             icons, NULL, n, LR_DEFAULTCOLOR);



More information about the wine-patches mailing list