kernel32: Remove unneeded casts

Andrew Talbot andrew.talbot at talbotville.com
Tue Dec 18 16:47:55 CST 2007


Changelog:
    kernel32: Remove unneeded casts.

diff --git a/dlls/kernel32/local16.c b/dlls/kernel32/local16.c
index 36bd774..5716281 100644
--- a/dlls/kernel32/local16.c
+++ b/dlls/kernel32/local16.c
@@ -133,7 +133,7 @@ typedef struct
   /* All local heap allocations are aligned on 4-byte boundaries */
 #define LALIGN(word)          (((word) + 3) & ~3)
 
-#define ARENA_PTR(ptr,arena)       ((LOCALARENA *)((char*)(ptr)+(arena)))
+#define ARENA_PTR(ptr,arena)       ((LOCALARENA *)((ptr)+(arena)))
 #define ARENA_PREV(ptr,arena)      (ARENA_PTR((ptr),(arena))->prev & ~3)
 #define ARENA_NEXT(ptr,arena)      (ARENA_PTR((ptr),(arena))->next)
 #define ARENA_FLAGS(ptr,arena)     (ARENA_PTR((ptr),(arena))->prev & 3)
@@ -1937,7 +1937,7 @@ static VOID Local32_FromHandle( LOCAL32HEADER *header, INT16 type,
         case  1:
         {
             WORD *selTable = (LPWORD)(header->base + header->selectorTableOffset);
-            DWORD offset   = (LPBYTE)ptr - header->base;
+            DWORD offset   = ptr - header->base;
             *addr = MAKELONG( offset & 0x7fff, selTable[offset >> 15] );
         }
         break;
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index 996abf3..47ca1ea 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -806,7 +806,7 @@ static BOOL load_library_as_datafile( LPCWSTR name, HMODULE* hmod)
 
     *hmod = 0;
 
-    if (SearchPathW( NULL, (LPCWSTR)name, dotDLL, sizeof(filenameW) / sizeof(filenameW[0]),
+    if (SearchPathW( NULL, name, dotDLL, sizeof(filenameW) / sizeof(filenameW[0]),
                      filenameW, NULL ))
     {
         hFile = CreateFileW( filenameW, GENERIC_READ, FILE_SHARE_READ,



More information about the wine-patches mailing list