Commit 706df65c authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

user32: Do not cast NULL.

parent 880d944e
......@@ -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;
......
......@@ -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 */
......
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