setupapi: Remove some superfluous casts.

Michael Stefaniuc mstefani at redhat.de
Sun Dec 7 21:06:20 CST 2008


---
 dlls/setupapi/devinst.c       |    6 +++---
 dlls/setupapi/diskspace.c     |    2 +-
 dlls/setupapi/misc.c          |    2 +-
 dlls/setupapi/parser.c        |    2 +-
 dlls/setupapi/tests/devinst.c |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index f134da1..1dbec9a 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -561,8 +561,8 @@ static BOOL SETUPDI_AddDeviceToSet(struct DeviceInfoSet *set,
             devInst->data.DevInst = devInfo->devId;
             devInst->data.Reserved = (ULONG_PTR)devInfo;
             SETUPDI_GuidToString(guid, classGuidStr);
-            SetupDiSetDeviceRegistryPropertyW((HDEVINFO)set,
-                &devInst->data, SPDRP_CLASSGUID, (const BYTE *)classGuidStr,
+            SetupDiSetDeviceRegistryPropertyW(set, &devInst->data,
+                SPDRP_CLASSGUID, (const BYTE *)classGuidStr,
                 lstrlenW(classGuidStr) * sizeof(WCHAR));
             if (dev) *dev = &devInst->data;
             ret = TRUE;
@@ -1190,7 +1190,7 @@ SetupDiCreateDeviceInfoListExW(const GUID *ClassGuid,
     list->cDevices = 0;
     list_init(&list->devices);
 
-    return (HDEVINFO)list;
+    return list;
 }
 
 /***********************************************************************
diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c
index 9da4e9d..e22133c 100644
--- a/dlls/setupapi/diskspace.c
+++ b/dlls/setupapi/diskspace.c
@@ -82,7 +82,7 @@ HDSKSPC WINAPI SetupCreateDiskSpaceListW(PVOID Reserved1, DWORD Reserved2, UINT
         }
        ptr += lstrlenW(ptr) + 1;
     }
-    return  (HANDLE)list;
+    return list;
 }
 
 
diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c
index 7109be9..44a0349 100644
--- a/dlls/setupapi/misc.c
+++ b/dlls/setupapi/misc.c
@@ -727,7 +727,7 @@ DWORD WINAPI TakeOwnershipOfFile(LPCWSTR lpFileName)
         goto fail;
     }
 
-    pOwner = (PTOKEN_OWNER)MyMalloc(dwSize);
+    pOwner = MyMalloc(dwSize);
     if (pOwner == NULL)
     {
         CloseHandle(hToken);
diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c
index c2bd84c..656fb78 100644
--- a/dlls/setupapi/parser.c
+++ b/dlls/setupapi/parser.c
@@ -1158,7 +1158,7 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err
     TRACE( "%s -> %p\n", debugstr_w(path), file );
     file->filename = path;
     SetLastError( 0 );
-    return (HINF)file;
+    return file;
 }
 
 
diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 37c3acd..ada6027 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -1091,7 +1091,7 @@ static void testRegisterAndGetDetail(void)
          "\\\\?\\root#legacy_bogus#0000#{6a55b5a4-3f65-11db-b704-0011955c2bdb}\\";
         PSP_DEVICE_INTERFACE_DETAIL_DATA_A detail = NULL;
 
-        detail = (PSP_DEVICE_INTERFACE_DETAIL_DATA_A)HeapAlloc(GetProcessHeap(), 0, dwSize);
+        detail = HeapAlloc(GetProcessHeap(), 0, dwSize);
         if (detail)
         {
             detail->cbSize = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath) + sizeof(char);
-- 
1.6.1.rc1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081208/ec440b58/attachment.pgp 


More information about the wine-patches mailing list