Commit b5e905a6 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wsock32: Remove superfluous pointer casts.

parent a3778259
...@@ -108,7 +108,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -108,7 +108,7 @@ DWORD WINAPI WsControl(DWORD protocol,
/* Get the command structure into a pointer we can use, /* Get the command structure into a pointer we can use,
rather than void */ rather than void */
TDIObjectID *pcommand = (TDIObjectID *)pRequestInfo; TDIObjectID *pcommand = pRequestInfo;
/* validate input parameters. Error codes are from winerror.h, not from /* validate input parameters. Error codes are from winerror.h, not from
* winsock.h. pcbResponseInfoLen is apparently allowed to be NULL for some * winsock.h. pcbResponseInfoLen is apparently allowed to be NULL for some
...@@ -149,7 +149,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -149,7 +149,7 @@ DWORD WINAPI WsControl(DWORD protocol,
*/ */
case ENTITY_LIST_ID: case ENTITY_LIST_ID:
{ {
TDIEntityID *baseptr = (TDIEntityID *)pResponseInfo; TDIEntityID *baseptr = pResponseInfo;
DWORD numInt, i, ifTable, spaceNeeded; DWORD numInt, i, ifTable, spaceNeeded;
PMIB_IFTABLE table; PMIB_IFTABLE table;
...@@ -280,7 +280,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -280,7 +280,7 @@ DWORD WINAPI WsControl(DWORD protocol,
{ {
PMIB_IPNETTABLE table; PMIB_IPNETTABLE table;
DWORD size; DWORD size;
PULONG output = (PULONG)pResponseInfo; PULONG output = pResponseInfo;
if (!pcbResponseInfoLen) if (!pcbResponseInfoLen)
return ERROR_BAD_ENVIRONMENT; return ERROR_BAD_ENVIRONMENT;
...@@ -323,7 +323,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -323,7 +323,7 @@ DWORD WINAPI WsControl(DWORD protocol,
return ERROR_BAD_ENVIRONMENT; return ERROR_BAD_ENVIRONMENT;
if (*pcbResponseInfoLen < sizeof(MIB_IPSTATS)) if (*pcbResponseInfoLen < sizeof(MIB_IPSTATS))
return ERROR_LOCK_VIOLATION; return ERROR_LOCK_VIOLATION;
GetIpStatistics((PMIB_IPSTATS)pResponseInfo); GetIpStatistics(pResponseInfo);
*pcbResponseInfoLen = sizeof(MIB_IPSTATS); *pcbResponseInfoLen = sizeof(MIB_IPSTATS);
} }
...@@ -346,7 +346,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -346,7 +346,7 @@ DWORD WINAPI WsControl(DWORD protocol,
return ERROR_BAD_ENVIRONMENT; return ERROR_BAD_ENVIRONMENT;
if (*pcbResponseInfoLen < sizeof(MIB_UDPSTATS)) if (*pcbResponseInfoLen < sizeof(MIB_UDPSTATS))
return ERROR_LOCK_VIOLATION; return ERROR_LOCK_VIOLATION;
GetUdpStatistics((PMIB_UDPSTATS)pResponseInfo); GetUdpStatistics(pResponseInfo);
*pcbResponseInfoLen = sizeof(MIB_UDPSTATS); *pcbResponseInfoLen = sizeof(MIB_UDPSTATS);
} }
break; break;
...@@ -368,7 +368,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -368,7 +368,7 @@ DWORD WINAPI WsControl(DWORD protocol,
return ERROR_BAD_ENVIRONMENT; return ERROR_BAD_ENVIRONMENT;
if (*pcbResponseInfoLen < sizeof(MIB_TCPSTATS)) if (*pcbResponseInfoLen < sizeof(MIB_TCPSTATS))
return ERROR_LOCK_VIOLATION; return ERROR_LOCK_VIOLATION;
GetTcpStatistics((PMIB_TCPSTATS)pResponseInfo); GetTcpStatistics(pResponseInfo);
*pcbResponseInfoLen = sizeof(MIB_TCPSTATS); *pcbResponseInfoLen = sizeof(MIB_TCPSTATS);
} }
break; break;
...@@ -386,7 +386,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -386,7 +386,7 @@ DWORD WINAPI WsControl(DWORD protocol,
case IP_MIB_ADDRTABLE_ENTRY_ID: case IP_MIB_ADDRTABLE_ENTRY_ID:
{ {
DWORD index = pcommand->toi_entity.tei_instance; DWORD index = pcommand->toi_entity.tei_instance;
PMIB_IPADDRROW baseIPInfo = (PMIB_IPADDRROW) pResponseInfo; PMIB_IPADDRROW baseIPInfo = pResponseInfo;
PMIB_IPADDRTABLE table; PMIB_IPADDRTABLE table;
DWORD tableSize, i; DWORD tableSize, i;
...@@ -437,7 +437,7 @@ DWORD WINAPI WsControl(DWORD protocol, ...@@ -437,7 +437,7 @@ DWORD WINAPI WsControl(DWORD protocol,
{ {
DWORD routeTableSize, numRoutes, ndx, ret; DWORD routeTableSize, numRoutes, ndx, ret;
PMIB_IPFORWARDTABLE table; PMIB_IPFORWARDTABLE table;
IPRouteEntry *winRouteTable = (IPRouteEntry *) pResponseInfo; IPRouteEntry *winRouteTable = pResponseInfo;
if (!pcbResponseInfoLen) if (!pcbResponseInfoLen)
return ERROR_BAD_ENVIRONMENT; return ERROR_BAD_ENVIRONMENT;
......
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