kernel32: Do not cast zero.

This commit is contained in:
Michael Stefaniuc 2008-11-03 22:35:08 +01:00 committed by Alexandre Julliard
parent efeab9d200
commit c9a10b32b4
3 changed files with 7 additions and 9 deletions

View File

@ -1750,7 +1750,7 @@ FARPROC16 WINAPI GetProcAddress16( HMODULE16 hModule, LPCSTR name )
ordinal = LOWORD(name);
TRACE("%04x %04x\n", hModule, ordinal );
}
if (!ordinal) return (FARPROC16)0;
if (!ordinal) return NULL;
ret = NE_GetEntryPoint( hModule, ordinal );

View File

@ -205,7 +205,7 @@ static SEGPTR TASK_AllocThunk(void)
{
sel = GLOBAL_Alloc( GMEM_FIXED, sizeof(THUNKS) + (MIN_THUNKS-1)*8,
pTask->hPDB, WINE_LDT_FLAGS_CODE );
if (!sel) return (SEGPTR)0;
if (!sel) return 0;
TASK_CreateThunks( sel, 0, MIN_THUNKS );
pThunk->next = sel;
}
@ -860,7 +860,7 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
if (!HIWORD(func)) {
/* Win95 actually protects via SEH, but this is better for debugging */
WARN("Ouch ! Called with invalid func %p !\n", func);
return (FARPROC16)0;
return NULL;
}
if ( (GlobalHandleToSel16(CURRENT_DS) != hInstanceSelector)
@ -884,7 +884,7 @@ FARPROC16 WINAPI MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
return func;
thunkaddr = TASK_AllocThunk();
if (!thunkaddr) return (FARPROC16)0;
if (!thunkaddr) return NULL;
thunk = MapSL( thunkaddr );
lfunc = MapSL( (SEGPTR)func );
@ -990,7 +990,7 @@ HANDLE16 WINAPI GetCodeHandle16( FARPROC16 proc )
SEGTABLEENTRY *pSeg;
if ( !TASK_GetCodeSegment( proc, NULL, &pSeg, NULL ) )
return (HANDLE16)0;
return 0;
return pSeg->hSeg;
}

View File

@ -740,8 +740,7 @@ static void test_timer_queue(void)
/* Run once and finish quickly (should be done when we delete it). */
t1 = NULL;
ret = pCreateTimerQueueTimer(&t1, q, timer_queue_cb5, (PVOID) 0, 0,
0, 0);
ret = pCreateTimerQueueTimer(&t1, q, timer_queue_cb5, NULL, 0, 0, 0);
ok(ret, "CreateTimerQueueTimer\n");
ok(t1 != NULL, "CreateTimerQueueTimer\n");
@ -754,8 +753,7 @@ static void test_timer_queue(void)
/* Run once and finish quickly (should be done when we delete it). */
t3 = NULL;
ret = pCreateTimerQueueTimer(&t3, q, timer_queue_cb5, (PVOID) 0, 0,
0, 0);
ret = pCreateTimerQueueTimer(&t3, q, timer_queue_cb5, NULL, 0, 0, 0);
ok(ret, "CreateTimerQueueTimer\n");
ok(t3 != NULL, "CreateTimerQueueTimer\n");