Michael Stefaniuc : Remove the remaining casts of NULL.
Alexandre Julliard
julliard at winehq.org
Mon Nov 3 09:06:58 CST 2008
Module: wine
Branch: master
Commit: 4f199a10adbedab97063efb0c0025de58111b1fa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f199a10adbedab97063efb0c0025de58111b1fa
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Sun Nov 2 00:27:00 2008 +0100
Remove the remaining casts of NULL.
---
dlls/atl/atl_ax.c | 2 +-
dlls/d3d8/device.c | 2 +-
dlls/d3d9/tests/visual.c | 2 +-
dlls/dmcompos/composer.c | 2 +-
dlls/dmime/performance.c | 2 +-
dlls/mpr/wnet.c | 2 +-
dlls/msi/tests/automation.c | 2 +-
dlls/msvcrt/tests/time.c | 2 +-
dlls/rsaenh/rsaenh.c | 2 +-
dlls/w32skrnl/win32s16.c | 2 +-
dlls/winmm/mmsystem.c | 2 +-
dlls/ws2_32/socket.c | 2 +-
programs/regedit/treeview.c | 2 +-
programs/taskmgr/taskmgr.c | 2 +-
14 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c
index 1d8a67c..e20c342 100644
--- a/dlls/atl/atl_ax.c
+++ b/dlls/atl/atl_ax.c
@@ -752,7 +752,7 @@ static HRESULT IOCS_Detach( IOCS *This ) /* remove subclassing */
if ( This->hWnd )
{
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;
}
if ( This->control )
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index e8df4f0..64e3b60 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1952,7 +1952,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(LPDIRECT3DDEVICE8 ifac
IWineD3DPixelShader_Release(object);
*ppShader = d3d8_shader->handle;
} else {
- *ppShader = (DWORD)NULL;
+ *ppShader = 0;
}
TRACE("(%p) : returning %#x\n", This, *ppShader);
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index dd59ef4..3caa08f 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -9603,7 +9603,7 @@ static void texop_range_test(IDirect3DDevice9 *device)
ok(SUCCEEDED(hr), "SetTextureStageState failed with 0x%08x\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_COLOROP, D3DTOP_DISABLE);
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);
IDirect3DTexture9_Release(texture);
}
diff --git a/dlls/dmcompos/composer.c b/dlls/dmcompos/composer.c
index c6a7a12..9b5f768 100644
--- a/dlls/dmcompos/composer.c
+++ b/dlls/dmcompos/composer.c
@@ -117,7 +117,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicComposerImpl (LPCGUID lpcGUID, LPVOID* pp
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl));
if (NULL == obj) {
- *ppobj = (LPDIRECTMUSICCOMPOSER) NULL;
+ *ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->lpVtbl = &DirectMusicComposer_Vtbl;
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 2c4560e..66b1a02 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -1020,7 +1020,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformance8Impl));
if (NULL == obj) {
- *ppobj = (LPDIRECTMUSICPERFORMANCE8)NULL;
+ *ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->lpVtbl = &DirectMusicPerformance8_Vtbl;
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index 3b05ede..b2599e1 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -2147,7 +2147,7 @@ DWORD WINAPI WNetGetNetworkInformationW( LPCWSTR lpProvider,
providerTable->table[providerIndex].dwSpecVersion;
lpNetInfoStruct->dwStatus = NO_ERROR;
lpNetInfoStruct->dwCharacteristics = 0;
- lpNetInfoStruct->dwHandle = (ULONG_PTR)NULL;
+ lpNetInfoStruct->dwHandle = 0;
lpNetInfoStruct->wNetType =
HIWORD(providerTable->table[providerIndex].dwNetType);
lpNetInfoStruct->dwPrinters = -1;
diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c
index b76aae1..4e82e9f 100644
--- a/dlls/msi/tests/automation.c
+++ b/dlls/msi/tests/automation.c
@@ -1849,7 +1849,7 @@ static void test_Installer_RegistryValue(void)
"RegSetValueExW failed\n");
ok(!RegSetValueExW(hkey,szSix,0,REG_QWORD, (const BYTE *)qw, 8),
"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");
ok(!RegSetValueExW(hkey,NULL,0,REG_SZ, (const BYTE *)szOne, sizeof(szOne)),
diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c
index 33b2e56..88564de 100644
--- a/dlls/msvcrt/tests/time.c
+++ b/dlls/msvcrt/tests/time.c
@@ -40,7 +40,7 @@ static void test_ctime(void)
}
static void test_gmtime(void)
{
- time_t gmt = (time_t)NULL;
+ time_t gmt = 0;
struct tm* gmt_tm = gmtime(&gmt);
if(gmt_tm == 0)
{
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c
index 6428ae1..40ca9e3 100644
--- a/dlls/rsaenh/rsaenh.c
+++ b/dlls/rsaenh/rsaenh.c
@@ -1677,7 +1677,7 @@ BOOL WINAPI RSAENH_CPCreateHash(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
pCryptHash->hKey = hKey;
pCryptHash->hProv = hProv;
pCryptHash->dwState = RSAENH_HASHSTATE_HASHING;
- pCryptHash->pHMACInfo = (PHMAC_INFO)NULL;
+ pCryptHash->pHMACInfo = NULL;
pCryptHash->dwHashSize = peaAlgidInfo->dwDefaultLen >> 3;
init_data_blob(&pCryptHash->tpPRFParams.blobLabel);
init_data_blob(&pCryptHash->tpPRFParams.blobSeed);
diff --git a/dlls/w32skrnl/win32s16.c b/dlls/w32skrnl/win32s16.c
index 3e983f0..4b3cb1d 100644
--- a/dlls/w32skrnl/win32s16.c
+++ b/dlls/w32skrnl/win32s16.c
@@ -45,7 +45,7 @@ void WINAPI BootTask16(void)
SEGPTR WINAPI StackLinearToSegmented16(WORD w1, WORD w2)
{
FIXME("(%d,%d):stub.\n",w1,w2);
- return (SEGPTR)NULL;
+ return 0;
}
diff --git a/dlls/winmm/mmsystem.c b/dlls/winmm/mmsystem.c
index 76e42f1..f3046b6 100644
--- a/dlls/winmm/mmsystem.c
+++ b/dlls/winmm/mmsystem.c
@@ -2834,7 +2834,7 @@ HMMIO16 WINAPI mmioOpen16(LPSTR szFileName, MMIOINFO16* lpmmioinfo16,
*/
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);
}
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index b485777..afa33ac 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -4390,7 +4390,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
CallerId.len = sizeof(src_addr);
CallerData.buf = NULL;
- CallerData.len = (ULONG)NULL;
+ CallerData.len = 0;
WS_getsockname(cs, &dst_addr, &size);
diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c
index 2b6f176..f51ccfd 100644
--- a/programs/regedit/treeview.c
+++ b/programs/regedit/treeview.c
@@ -532,7 +532,7 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPWSTR pHostName)
tvins.u.item.iSelectedImage = Image_Root;
tvins.u.item.cChildren = 5;
/* 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.hParent = TVI_ROOT;
/* Add the item to the tree view control. */
diff --git a/programs/taskmgr/taskmgr.c b/programs/taskmgr/taskmgr.c
index d2f88ec..c765b74 100644
--- a/programs/taskmgr/taskmgr.c
+++ b/programs/taskmgr/taskmgr.c
@@ -1076,7 +1076,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
/* 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 */
More information about the wine-cvs
mailing list