From 706df65c5a02d6d889bfa7f4656b4738e3a97dc7 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Sun, 2 Nov 2008 00:23:27 +0100 Subject: [PATCH] user32: Do not cast NULL. --- dlls/user32/comm16.c | 4 ++-- dlls/user32/tests/dde.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/user32/comm16.c b/dlls/user32/comm16.c index c7f3ab217e7..46f72c6778e 100644 --- a/dlls/user32/comm16.c +++ b/dlls/user32/comm16.c @@ -752,14 +752,14 @@ SEGPTR WINAPI SetCommEventMask16(INT16 cid,UINT16 fuEvtMask) TRACE("cid %d,mask %d\n",cid,fuEvtMask); if ((ptr = GetDeviceStruct(cid)) == NULL) { FIXME("no handle for cid = %0x!\n",cid); - return (SEGPTR)NULL; + return 0; } ptr->eventmask = fuEvtMask; if (cid&FLAG_LPT) { WARN(" cid %d not comm port\n",cid); - return (SEGPTR)NULL; + return 0; } /* it's a COM port ? -> modify flags */ stol = (unsigned char *)COM[cid].unknown + COMM_MSR_OFFSET; diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c index 968cd260a03..14a52b5816e 100644 --- a/dlls/user32/tests/dde.c +++ b/dlls/user32/tests/dde.c @@ -1726,7 +1726,7 @@ static void test_FreeDDElParam(void) HGLOBAL val, hglobal; BOOL ret; - ret = FreeDDElParam(WM_DDE_INITIATE, (LPARAM)NULL); + ret = FreeDDElParam(WM_DDE_INITIATE, 0); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); hglobal = GlobalAlloc(GMEM_DDESHARE, 100); @@ -1975,7 +1975,7 @@ static void test_UnpackDDElParam(void) /* NULL lParam */ lo = 0xdead; hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_INITIATE, (LPARAM)NULL, &lo, &hi); + ret = UnpackDDElParam(WM_DDE_INITIATE, 0, &lo, &hi); ok(ret == TRUE, "Expected TRUE, got %d\n", ret); ok(lo == 0, "Expected 0, got %08lx\n", lo); ok(hi == 0, "Expected 0, got %08lx\n", hi); @@ -2012,7 +2012,7 @@ static void test_UnpackDDElParam(void) lo = 0xdead; hi = 0xbeef; - ret = UnpackDDElParam(WM_DDE_ADVISE, (LPARAM)NULL, &lo, &hi); + ret = UnpackDDElParam(WM_DDE_ADVISE, 0, &lo, &hi); ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(lo == 0 || broken(lo == 0xdead), /* win2k */