From 7bce56881f4715f8a3fb4cc5f4645267a792a1e2 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Wed, 19 Dec 2007 21:52:17 +0000 Subject: [PATCH] kernel32: Remove unneeded casts. --- dlls/kernel32/ne_module.c | 4 ++-- dlls/kernel32/ne_segment.c | 4 ++-- dlls/kernel32/resource.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/kernel32/ne_module.c b/dlls/kernel32/ne_module.c index 93f8f8edd7..e41ced97cd 100644 --- a/dlls/kernel32/ne_module.c +++ b/dlls/kernel32/ne_module.c @@ -529,7 +529,7 @@ FARPROC16 NE_GetEntryPointEx( HMODULE16 hModule, WORD ordinal, BOOL16 snoop ) if (!snoop) return (FARPROC16)MAKESEGPTR( sel, offset ); else - return (FARPROC16)SNOOP16_GetProcAddress16(hModule,ordinal,(FARPROC16)MAKESEGPTR( sel, offset )); + return SNOOP16_GetProcAddress16(hModule,ordinal,(FARPROC16)MAKESEGPTR( sel, offset )); } @@ -2051,7 +2051,7 @@ static HMODULE16 create_dummy_module( HMODULE module32 ) pStr += len+2; /* All tables zero terminated */ - pModule->ne_rsrctab = pModule->ne_imptab = pModule->ne_enttab = (char *)pStr - (char *)pModule; + pModule->ne_rsrctab = pModule->ne_imptab = pModule->ne_enttab = pStr - (char *)pModule; NE_RegisterModule( pModule ); pModule->owner32 = LoadLibraryA( filename ); /* increment the ref count of the 32-bit module */ diff --git a/dlls/kernel32/ne_segment.c b/dlls/kernel32/ne_segment.c index 7758d6d400..8a3497eb3a 100644 --- a/dlls/kernel32/ne_segment.c +++ b/dlls/kernel32/ne_segment.c @@ -463,7 +463,7 @@ BOOL NE_LoadSegment( NE_MODULE *pModule, WORD segnum ) BOOL NE_LoadAllSegments( NE_MODULE *pModule ) { int i; - SEGTABLEENTRY * pSegTable = (SEGTABLEENTRY *) NE_SEG_TABLE(pModule); + SEGTABLEENTRY * pSegTable = NE_SEG_TABLE(pModule); if (pModule->ne_flags & NE_FFLAGS_SELFLOAD) { @@ -551,7 +551,7 @@ static void NE_FixupSegmentPrologs(NE_MODULE *pModule, WORD segnum) /*TRACE("entry: %p, entry->segnum: %d, entry->offs: %04x\n", entry, entry->segnum, entry->offs);*/ if (entry->segnum == segnum) { - pFunc = ((BYTE *)pSeg+entry->offs); + pFunc = pSeg+entry->offs; TRACE("pFunc: %p, *(DWORD *)pFunc: %08x, num_entries: %d\n", pFunc, *(DWORD *)pFunc, num_entries); if (*(pFunc+2) == 0x90) { diff --git a/dlls/kernel32/resource.c b/dlls/kernel32/resource.c index ff2ec956b9..2fbf263644 100644 --- a/dlls/kernel32/resource.c +++ b/dlls/kernel32/resource.c @@ -586,7 +586,7 @@ LPVOID WINAPI LockResource( HGLOBAL handle ) TRACE("(%p)\n", handle ); if (HIWORD( handle )) /* 32-bit memory handle */ - return (LPVOID)handle; + return handle; /* 16-bit memory handle */ return LockResource16( HGLOBAL_16(handle) );