SHELL32: remove some dead code and some ifdefs

Mike McCormack mike at codeweavers.com
Thu Mar 17 05:38:33 CST 2005


ChangeLog:
* remove some dead code and some ifdefs
-------------- next part --------------
Index: dlls/shell32/shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v
retrieving revision 1.95
diff -u -p -r1.95 shlfolder.c
--- dlls/shell32/shlfolder.c	7 Mar 2005 11:05:03 -0000	1.95
+++ dlls/shell32/shlfolder.c	17 Mar 2005 11:35:06 -0000
@@ -1,4 +1,3 @@
-
 /*
  *	Shell Folder stuff
  *
@@ -51,19 +50,8 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL (shell);
 
-/***************************************************************************
- * debughelper: print out the return address
- *  helps especially to track down unbalanced AddRef/Release
- */
-#define MEM_DEBUG 0
-
-#if MEM_DEBUG
-#define _CALL_TRACE TRACE("called from: 0x%08x\n", *( ((UINT*)&iface)-1 ));
-#else
-#define _CALL_TRACE
-#endif
-
-static const WCHAR wszDotShellClassInfo[] = {'.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0};
+static const WCHAR wszDotShellClassInfo[] = {
+    '.','S','h','e','l','l','C','l','a','s','s','I','n','f','o',0};
 
 /***************************************************************************
  *  SHELL32_GetCustomFolderAttribute (internal function)
@@ -86,26 +74,26 @@ BOOL SHELL32_GetCustomFolderAttribute(
     LPCITEMIDLIST pidl, LPCWSTR pwszHeading, LPCWSTR pwszAttribute,
     LPWSTR pwszValue, DWORD cchValue)
 {
-#if 0 /* Hack around not having system attribute on non-Windows file systems */
-    DWORD dwAttrib = _ILGetFileAttributes(pidl, NULL, 0);
-#else
+    static const WCHAR wszDesktopIni[] =
+            {'d','e','s','k','t','o','p','.','i','n','i',0};
+    static const WCHAR wszDefault[] = {0};
     DWORD dwAttrib = FILE_ATTRIBUTE_SYSTEM;
-#endif
+
+    /* Hack around not having system attribute on non-Windows file systems */
+    if (0)
+        dwAttrib = _ILGetFileAttributes(pidl, NULL, 0);
+
     if (dwAttrib & FILE_ATTRIBUTE_SYSTEM)
     {
         DWORD ret;
         WCHAR wszDesktopIniPath[MAX_PATH];
-        static const WCHAR wszDesktopIni[] =
-            {'d','e','s','k','t','o','p','.','i','n','i',0};
-        static const WCHAR wszDefault[] =
-            {0};
+
         if (!SHGetPathFromIDListW(pidl, wszDesktopIniPath))
             return FALSE;
         PathAppendW(wszDesktopIniPath, wszDesktopIni);
         ret = GetPrivateProfileStringW(pwszHeading, pwszAttribute,
             wszDefault, pwszValue, cchValue, wszDesktopIniPath);
-        if (!ret) return FALSE;
-        return TRUE;
+        return ret;
     }
     return FALSE;
 }


More information about the wine-patches mailing list