Remove the remaining casts of NULL.

This commit is contained in:
Michael Stefaniuc 2008-11-02 00:27:00 +01:00 committed by Alexandre Julliard
parent d4b8948ce3
commit 4f199a10ad
14 changed files with 14 additions and 14 deletions

View File

@ -752,7 +752,7 @@ static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */
if ( This->hWnd ) if ( This->hWnd )
{ {
SetWindowLongPtrW( This->hWnd, GWLP_WNDPROC, (ULONG_PTR) This->OrigWndProc ); SetWindowLongPtrW( This->hWnd, GWLP_WNDPROC, (ULONG_PTR) This->OrigWndProc );
SetWindowLongPtrW( This->hWnd, GWLP_USERDATA, (LONG_PTR) NULL ); SetWindowLongPtrW( This->hWnd, GWLP_USERDATA, 0 );
This->hWnd = NULL; This->hWnd = NULL;
} }
if ( This->control ) if ( This->control )

View File

@ -1952,7 +1952,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(LPDIRECT3DDEVICE8 ifac
IWineD3DPixelShader_Release(object); IWineD3DPixelShader_Release(object);
*ppShader = d3d8_shader->handle; *ppShader = d3d8_shader->handle;
} else { } else {
*ppShader = (DWORD)NULL; *ppShader = 0;
} }
TRACE("(%p) : returning %#x\n", This, *ppShader); TRACE("(%p) : returning %#x\n", This, *ppShader);

View File

@ -9603,7 +9603,7 @@ static void texop_range_test(IDirect3DDevice9 *device)
ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr); ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE); hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE);
ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr); ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr);
hr = IDirect3DDevice9_SetTexture(device, 1, (IDirect3DBaseTexture9 *)NULL); hr = IDirect3DDevice9_SetTexture(device, 1, NULL);
ok(SUCCEEDED(hr), "SetTexture failed with 0x%08x\n", hr); ok(SUCCEEDED(hr), "SetTexture failed with 0x%08x\n", hr);
IDirect3DTexture9_Release(texture); IDirect3DTexture9_Release(texture);
} }

View File

@ -117,7 +117,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicComposerImpl (LPCGUID lpcGUID, LPVOID* pp
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl)); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl));
if (NULL == obj) { if (NULL == obj) {
*ppobj = (LPDIRECTMUSICCOMPOSER) NULL; *ppobj = NULL;
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
obj->lpVtbl = &DirectMusicComposer_Vtbl; obj->lpVtbl = &DirectMusicComposer_Vtbl;

View File

@ -1020,7 +1020,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformance8Impl)); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformance8Impl));
if (NULL == obj) { if (NULL == obj) {
*ppobj = (LPDIRECTMUSICPERFORMANCE8)NULL; *ppobj = NULL;
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
obj->lpVtbl = &DirectMusicPerformance8_Vtbl; obj->lpVtbl = &DirectMusicPerformance8_Vtbl;

View File

@ -2147,7 +2147,7 @@ DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider,
providerTable->table[providerIndex].dwSpecVersion; providerTable->table[providerIndex].dwSpecVersion;
lpNetInfoStruct->dwStatus = NO_ERROR; lpNetInfoStruct->dwStatus = NO_ERROR;
lpNetInfoStruct->dwCharacteristics = 0; lpNetInfoStruct->dwCharacteristics = 0;
lpNetInfoStruct->dwHandle = (ULONG_PTR)NULL; lpNetInfoStruct->dwHandle = 0;
lpNetInfoStruct->wNetType = lpNetInfoStruct->wNetType =
HIWORD(providerTable->table[providerIndex].dwNetType); HIWORD(providerTable->table[providerIndex].dwNetType);
lpNetInfoStruct->dwPrinters = -1; lpNetInfoStruct->dwPrinters = -1;

View File

@ -1849,7 +1849,7 @@ static void test_Installer_RegistryValue(void)
"RegSetValueExW failed\n"); "RegSetValueExW failed\n");
ok(!RegSetValueExW(hkey,szSix,0,REG_QWORD, (const BYTE *)qw, 8), ok(!RegSetValueExW(hkey,szSix,0,REG_QWORD, (const BYTE *)qw, 8),
"RegSetValueExW failed\n"); "RegSetValueExW failed\n");
ok(!RegSetValueExW(hkey,szSeven,0,REG_NONE, (const BYTE *)NULL, 0), ok(!RegSetValueExW(hkey,szSeven,0,REG_NONE, NULL, 0),
"RegSetValueExW failed\n"); "RegSetValueExW failed\n");
ok(!RegSetValueExW(hkey,NULL,0,REG_SZ, (const BYTE *)szOne, sizeof(szOne)), ok(!RegSetValueExW(hkey,NULL,0,REG_SZ, (const BYTE *)szOne, sizeof(szOne)),

View File

@ -40,7 +40,7 @@ static void test_ctime(void)
} }
static void test_gmtime(void) static void test_gmtime(void)
{ {
time_t gmt = (time_t)NULL; time_t gmt = 0;
struct tm* gmt_tm = gmtime(&gmt); struct tm* gmt_tm = gmtime(&gmt);
if(gmt_tm == 0) if(gmt_tm == 0)
{ {

View File

@ -1677,7 +1677,7 @@ BOOL WINAPI RSAENH_CPCreateHash(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
pCryptHash->hKey = hKey; pCryptHash->hKey = hKey;
pCryptHash->hProv = hProv; pCryptHash->hProv = hProv;
pCryptHash->dwState = RSAENH_HASHSTATE_HASHING; pCryptHash->dwState = RSAENH_HASHSTATE_HASHING;
pCryptHash->pHMACInfo = (PHMAC_INFO)NULL; pCryptHash->pHMACInfo = NULL;
pCryptHash->dwHashSize = peaAlgidInfo->dwDefaultLen >> 3; pCryptHash->dwHashSize = peaAlgidInfo->dwDefaultLen >> 3;
init_data_blob(&pCryptHash->tpPRFParams.blobLabel); init_data_blob(&pCryptHash->tpPRFParams.blobLabel);
init_data_blob(&pCryptHash->tpPRFParams.blobSeed); init_data_blob(&pCryptHash->tpPRFParams.blobSeed);

View File

@ -45,7 +45,7 @@ void WINAPI BootTask16(void)
SEGPTR WINAPI StackLinearToSegmented16(WORD w1, WORD w2) SEGPTR WINAPI StackLinearToSegmented16(WORD w1, WORD w2)
{ {
FIXME("(%d,%d):stub.\n",w1,w2); FIXME("(%d,%d):stub.\n",w1,w2);
return (SEGPTR)NULL; return 0;
} }

View File

@ -2834,7 +2834,7 @@ HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16,
*/ */
MMRESULT16 WINAPI mmioClose16(HMMIO16 hmmio, UINT16 uFlags) MMRESULT16 WINAPI mmioClose16(HMMIO16 hmmio, UINT16 uFlags)
{ {
MMIO_SetSegmentedBuffer(HMMIO_32(hmmio), (SEGPTR)NULL, TRUE); MMIO_SetSegmentedBuffer(HMMIO_32(hmmio), 0, TRUE);
return mmioClose(HMMIO_32(hmmio), uFlags); return mmioClose(HMMIO_32(hmmio), uFlags);
} }

View File

@ -4390,7 +4390,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
CallerId.len = sizeof(src_addr); CallerId.len = sizeof(src_addr);
CallerData.buf = NULL; CallerData.buf = NULL;
CallerData.len = (ULONG)NULL; CallerData.len = 0;
WS_getsockname(cs, &dst_addr, &size); WS_getsockname(cs, &dst_addr, &size);

View File

@ -532,7 +532,7 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPWSTR pHostName)
tvins.u.item.iSelectedImage = Image_Root; tvins.u.item.iSelectedImage = Image_Root;
tvins.u.item.cChildren = 5; tvins.u.item.cChildren = 5;
/* Save the heading level in the item's application-defined data area. */ /* Save the heading level in the item's application-defined data area. */
tvins.u.item.lParam = (LPARAM)NULL; tvins.u.item.lParam = 0;
tvins.hInsertAfter = (HTREEITEM)TVI_FIRST; tvins.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvins.hParent = TVI_ROOT; tvins.hParent = TVI_ROOT;
/* Add the item to the tree view control. */ /* Add the item to the tree view control. */

View File

@ -1076,7 +1076,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
/* Get the debug privilege for this process. */ /* Get the debug privilege for this process. */
AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0); AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, 0);
} }
/* Load our settings from the registry */ /* Load our settings from the registry */