Michael Stefaniuc : kernel32: Do not cast zero.
Alexandre Julliard
julliard at winehq.org
Tue Nov 4 07:29:15 CST 2008
Module: wine
Branch: master
Commit: c9a10b32b438d8b2563c9e6a9a41d256a74cfee6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c9a10b32b438d8b2563c9e6a9a41d256a74cfee6
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Nov 3 22:35:08 2008 +0100
kernel32: Do not cast zero.
---
dlls/kernel32/ne_module.c | 2 +-
dlls/kernel32/task.c | 8 ++++----
dlls/kernel32/tests/sync.c | 6 ++----
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/kernel32/ne_module.c b/dlls/kernel32/ne_module.c
index dae1a0d..0342a5c 100644
--- a/dlls/kernel32/ne_module.c
+++ b/dlls/kernel32/ne_module.c
@@ -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 );
diff --git a/dlls/kernel32/task.c b/dlls/kernel32/task.c
index fcba2e9..553d1b3 100644
--- a/dlls/kernel32/task.c
+++ b/dlls/kernel32/task.c
@@ -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;
}
diff --git a/dlls/kernel32/tests/sync.c b/dlls/kernel32/tests/sync.c
index dbf7929..ade9b74 100644
--- a/dlls/kernel32/tests/sync.c
+++ b/dlls/kernel32/tests/sync.c
@@ -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");
More information about the wine-cvs
mailing list