Commit ca6003b8 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

kernel32: Remove unneeded casts.

parent 3fa10f79
...@@ -709,7 +709,7 @@ DWORD WINAPI ThunkInitLS( ...@@ -709,7 +709,7 @@ DWORD WINAPI ThunkInitLS(
if (!addr[1]) if (!addr[1])
return 0; return 0;
*(DWORD*)thunk = addr[1]; *thunk = addr[1];
return addr[1]; return addr[1];
} }
...@@ -1645,7 +1645,7 @@ static BOOL THUNK_Init(void) ...@@ -1645,7 +1645,7 @@ static BOOL THUNK_Init(void)
ThunkletHeap = HeapCreate( 0, 0x10000, 0x10000 ); ThunkletHeap = HeapCreate( 0, 0x10000, 0x10000 );
if (!ThunkletHeap) return FALSE; if (!ThunkletHeap) return FALSE;
ThunkletCodeSel = SELECTOR_AllocBlock( (void *)ThunkletHeap, 0x10000, WINE_LDT_FLAGS_CODE ); ThunkletCodeSel = SELECTOR_AllocBlock( ThunkletHeap, 0x10000, WINE_LDT_FLAGS_CODE );
thunk = HeapAlloc( ThunkletHeap, 0, 5 ); thunk = HeapAlloc( ThunkletHeap, 0, 5 );
if (!thunk) return FALSE; if (!thunk) return FALSE;
...@@ -1712,7 +1712,7 @@ static FARPROC THUNK_AllocLSThunklet( SEGPTR target, DWORD relay, ...@@ -1712,7 +1712,7 @@ static FARPROC THUNK_AllocLSThunklet( SEGPTR target, DWORD relay,
thunk->jmp_glue = 0xE9; thunk->jmp_glue = 0xE9;
thunk->target = (DWORD)target; thunk->target = (DWORD)target;
thunk->relay = (DWORD)relay; thunk->relay = relay;
thunk->glue = (DWORD)glue - (DWORD)&thunk->type; thunk->glue = (DWORD)glue - (DWORD)&thunk->type;
thunk->type = THUNKLET_TYPE_LS; thunk->type = THUNKLET_TYPE_LS;
...@@ -1746,7 +1746,7 @@ static SEGPTR THUNK_AllocSLThunklet( FARPROC target, DWORD relay, ...@@ -1746,7 +1746,7 @@ static SEGPTR THUNK_AllocSLThunklet( FARPROC target, DWORD relay,
thunk->jmp_glue = 0xEA; thunk->jmp_glue = 0xEA;
thunk->target = (DWORD)target; thunk->target = (DWORD)target;
thunk->relay = (DWORD)relay; thunk->relay = relay;
thunk->glue = (DWORD)glue; thunk->glue = (DWORD)glue;
thunk->type = THUNKLET_TYPE_SL; thunk->type = THUNKLET_TYPE_SL;
...@@ -2076,7 +2076,7 @@ SEGPTR WINAPI Get16DLLAddress(HMODULE16 handle, LPSTR func_name) ...@@ -2076,7 +2076,7 @@ SEGPTR WINAPI Get16DLLAddress(HMODULE16 handle, LPSTR func_name)
if (!code_sel32) if (!code_sel32)
{ {
if (!ThunkletHeap) THUNK_Init(); if (!ThunkletHeap) THUNK_Init();
code_sel32 = SELECTOR_AllocBlock( (void *)ThunkletHeap, 0x10000, code_sel32 = SELECTOR_AllocBlock( ThunkletHeap, 0x10000,
WINE_LDT_FLAGS_CODE | WINE_LDT_FLAGS_32BIT ); WINE_LDT_FLAGS_CODE | WINE_LDT_FLAGS_32BIT );
if (!code_sel32) return 0; if (!code_sel32) return 0;
} }
......
...@@ -98,7 +98,7 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_MODULE** ldr_mod, ULON ...@@ -98,7 +98,7 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_MODULE** ldr_mod, ULON
&pbi, sizeof(pbi), NULL ); &pbi, sizeof(pbi), NULL );
if (!status) if (!status)
{ {
if (ReadProcessMemory( hProcess, &((PEB*)pbi.PebBaseAddress)->LdrData, if (ReadProcessMemory( hProcess, &pbi.PebBaseAddress->LdrData,
&pLdrData, sizeof(pLdrData), NULL ) && &pLdrData, sizeof(pLdrData), NULL ) &&
ReadProcessMemory( hProcess, ReadProcessMemory( hProcess,
&pLdrData->InLoadOrderModuleList.Flink, &pLdrData->InLoadOrderModuleList.Flink,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment