mirror of
https://github.com/reactos/wine.git
synced 2025-04-11 04:20:59 +00:00
mpr: Remove superfluous pointer casts.
This commit is contained in:
parent
c91aa7a96d
commit
f927cfd26b
@ -749,8 +749,7 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|||||||
dwScope, dwType, dwUsage, lpNet, &handle);
|
dwScope, dwType, dwUsage, lpNet, &handle);
|
||||||
if (ret == WN_SUCCESS)
|
if (ret == WN_SUCCESS)
|
||||||
{
|
{
|
||||||
*lphEnum =
|
*lphEnum = _createProviderEnumerator(
|
||||||
(HANDLE)_createProviderEnumerator(
|
|
||||||
dwScope, dwType, dwUsage, index, handle);
|
dwScope, dwType, dwUsage, index, handle);
|
||||||
ret = *lphEnum ? WN_SUCCESS :
|
ret = *lphEnum ? WN_SUCCESS :
|
||||||
WN_OUT_OF_MEMORY;
|
WN_OUT_OF_MEMORY;
|
||||||
@ -764,7 +763,7 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|||||||
}
|
}
|
||||||
else if (lpNet->lpRemoteName)
|
else if (lpNet->lpRemoteName)
|
||||||
{
|
{
|
||||||
*lphEnum = (HANDLE)_createGlobalEnumeratorW(dwScope,
|
*lphEnum = _createGlobalEnumeratorW(dwScope,
|
||||||
dwType, dwUsage, lpNet);
|
dwType, dwUsage, lpNet);
|
||||||
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
@ -776,13 +775,13 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|||||||
/* comment matches the "Entire Network", enumerate
|
/* comment matches the "Entire Network", enumerate
|
||||||
* global scope of every provider
|
* global scope of every provider
|
||||||
*/
|
*/
|
||||||
*lphEnum = (HANDLE)_createGlobalEnumeratorW(dwScope,
|
*lphEnum = _createGlobalEnumeratorW(dwScope,
|
||||||
dwType, dwUsage, lpNet);
|
dwType, dwUsage, lpNet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* this is the same as not having passed lpNet */
|
/* this is the same as not having passed lpNet */
|
||||||
*lphEnum = (HANDLE)_createGlobalEnumeratorW(dwScope,
|
*lphEnum = _createGlobalEnumeratorW(dwScope,
|
||||||
dwType, dwUsage, NULL);
|
dwType, dwUsage, NULL);
|
||||||
}
|
}
|
||||||
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
||||||
@ -790,19 +789,18 @@ DWORD WINAPI WNetOpenEnumW( DWORD dwScope, DWORD dwType, DWORD dwUsage,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*lphEnum = (HANDLE)_createGlobalEnumeratorW(dwScope, dwType,
|
*lphEnum = _createGlobalEnumeratorW(dwScope, dwType,
|
||||||
dwUsage, lpNet);
|
dwUsage, lpNet);
|
||||||
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RESOURCE_CONTEXT:
|
case RESOURCE_CONTEXT:
|
||||||
*lphEnum = (HANDLE)_createContextEnumerator(dwScope, dwType,
|
*lphEnum = _createContextEnumerator(dwScope, dwType, dwUsage);
|
||||||
dwUsage);
|
|
||||||
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
case RESOURCE_REMEMBERED:
|
case RESOURCE_REMEMBERED:
|
||||||
case RESOURCE_CONNECTED:
|
case RESOURCE_CONNECTED:
|
||||||
*lphEnum = (HANDLE)_createNullEnumerator();
|
*lphEnum = _createNullEnumerator();
|
||||||
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
ret = *lphEnum ? WN_SUCCESS : WN_OUT_OF_MEMORY;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -856,8 +854,8 @@ DWORD WINAPI WNetEnumResourceA( HANDLE hEnum, LPDWORD lpcCount,
|
|||||||
* size is the appropriate usage of this function, so
|
* size is the appropriate usage of this function, so
|
||||||
* hopefully it won't be an issue.
|
* hopefully it won't be an issue.
|
||||||
*/
|
*/
|
||||||
ret = _thunkNetResourceArrayWToA((LPNETRESOURCEW)localBuffer,
|
ret = _thunkNetResourceArrayWToA(localBuffer, &localCount,
|
||||||
&localCount, lpBuffer, lpBufferSize);
|
lpBuffer, lpBufferSize);
|
||||||
*lpcCount = localCount;
|
*lpcCount = localCount;
|
||||||
}
|
}
|
||||||
HeapFree(GetProcessHeap(), 0, localBuffer);
|
HeapFree(GetProcessHeap(), 0, localBuffer);
|
||||||
@ -926,8 +924,7 @@ static DWORD _enumerateProvidersW(PWNetEnumerator enumerator, LPDWORD lpcCount,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
strNext = (LPWSTR)((LPBYTE)lpBuffer + count * sizeof(NETRESOURCEW));
|
strNext = (LPWSTR)((LPBYTE)lpBuffer + count * sizeof(NETRESOURCEW));
|
||||||
for (i = 0, resource = (LPNETRESOURCEW)lpBuffer; i < count;
|
for (i = 0, resource = lpBuffer; i < count; i++, resource++)
|
||||||
i++, resource++)
|
|
||||||
{
|
{
|
||||||
resource->dwScope = RESOURCE_GLOBALNET;
|
resource->dwScope = RESOURCE_GLOBALNET;
|
||||||
resource->dwType = RESOURCETYPE_ANY;
|
resource->dwType = RESOURCETYPE_ANY;
|
||||||
@ -1139,7 +1136,7 @@ static DWORD _enumerateContextW(PWNetEnumerator enumerator, LPDWORD lpcCount,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LPNETRESOURCEW lpNet = (LPNETRESOURCEW)lpBuffer;
|
LPNETRESOURCEW lpNet = lpBuffer;
|
||||||
|
|
||||||
lpNet->dwScope = RESOURCE_GLOBALNET;
|
lpNet->dwScope = RESOURCE_GLOBALNET;
|
||||||
lpNet->dwType = enumerator->dwType;
|
lpNet->dwType = enumerator->dwType;
|
||||||
@ -1887,7 +1884,7 @@ DWORD WINAPI WNetGetUniversalNameA ( LPCSTR lpLocalPath, DWORD dwInfoLevel,
|
|||||||
{
|
{
|
||||||
case UNIVERSAL_NAME_INFO_LEVEL:
|
case UNIVERSAL_NAME_INFO_LEVEL:
|
||||||
{
|
{
|
||||||
LPUNIVERSAL_NAME_INFOA info = (LPUNIVERSAL_NAME_INFOA)lpBuffer;
|
LPUNIVERSAL_NAME_INFOA info = lpBuffer;
|
||||||
|
|
||||||
size = sizeof(*info) + lstrlenA(lpLocalPath) + 1;
|
size = sizeof(*info) + lstrlenA(lpLocalPath) + 1;
|
||||||
if (*lpBufferSize < size)
|
if (*lpBufferSize < size)
|
||||||
@ -1929,7 +1926,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
|
|||||||
{
|
{
|
||||||
case UNIVERSAL_NAME_INFO_LEVEL:
|
case UNIVERSAL_NAME_INFO_LEVEL:
|
||||||
{
|
{
|
||||||
LPUNIVERSAL_NAME_INFOW info = (LPUNIVERSAL_NAME_INFOW)lpBuffer;
|
LPUNIVERSAL_NAME_INFOW info = lpBuffer;
|
||||||
|
|
||||||
size = sizeof(*info) + (lstrlenW(lpLocalPath) + 1) * sizeof(WCHAR);
|
size = sizeof(*info) + (lstrlenW(lpLocalPath) + 1) * sizeof(WCHAR);
|
||||||
if (*lpBufferSize < size)
|
if (*lpBufferSize < size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user