user32: Do not cast NULL.

This commit is contained in:
Michael Stefaniuc 2008-11-02 00:23:27 +01:00 committed by Alexandre Julliard
parent 880d944ea0
commit 706df65c5a
2 changed files with 5 additions and 5 deletions

View File

@ -752,14 +752,14 @@ SEGPTR WINAPI SetCommEventMask16(INT16 cid,UINT16 fuEvtMask)
TRACE("cid %d,mask %d\n",cid,fuEvtMask); TRACE("cid %d,mask %d\n",cid,fuEvtMask);
if ((ptr = GetDeviceStruct(cid)) == NULL) { if ((ptr = GetDeviceStruct(cid)) == NULL) {
FIXME("no handle for cid = %0x!\n",cid); FIXME("no handle for cid = %0x!\n",cid);
return (SEGPTR)NULL; return 0;
} }
ptr->eventmask = fuEvtMask; ptr->eventmask = fuEvtMask;
if (cid&FLAG_LPT) { if (cid&FLAG_LPT) {
WARN(" cid %d not comm port\n",cid); WARN(" cid %d not comm port\n",cid);
return (SEGPTR)NULL; return 0;
} }
/* it's a COM port ? -> modify flags */ /* it's a COM port ? -> modify flags */
stol = (unsigned char *)COM[cid].unknown + COMM_MSR_OFFSET; stol = (unsigned char *)COM[cid].unknown + COMM_MSR_OFFSET;

View File

@ -1726,7 +1726,7 @@ static void test_FreeDDElParam(void)
HGLOBAL val, hglobal; HGLOBAL val, hglobal;
BOOL ret; BOOL ret;
ret = FreeDDElParam(WM_DDE_INITIATE, (LPARAM)NULL); ret = FreeDDElParam(WM_DDE_INITIATE, 0);
ok(ret == TRUE, "Expected TRUE, got %d\n", ret); ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
hglobal = GlobalAlloc(GMEM_DDESHARE, 100); hglobal = GlobalAlloc(GMEM_DDESHARE, 100);
@ -1975,7 +1975,7 @@ static void test_UnpackDDElParam(void)
/* NULL lParam */ /* NULL lParam */
lo = 0xdead; lo = 0xdead;
hi = 0xbeef; 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(ret == TRUE, "Expected TRUE, got %d\n", ret);
ok(lo == 0, "Expected 0, got %08lx\n", lo); ok(lo == 0, "Expected 0, got %08lx\n", lo);
ok(hi == 0, "Expected 0, got %08lx\n", hi); ok(hi == 0, "Expected 0, got %08lx\n", hi);
@ -2012,7 +2012,7 @@ static void test_UnpackDDElParam(void)
lo = 0xdead; lo = 0xdead;
hi = 0xbeef; 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(ret == FALSE, "Expected FALSE, got %d\n", ret);
ok(lo == 0 || ok(lo == 0 ||
broken(lo == 0xdead), /* win2k */ broken(lo == 0xdead), /* win2k */