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

wsdapi: Use the ARRAY_SIZE() macro.

parent a625ddbc
...@@ -150,7 +150,7 @@ static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddressEx(IWSDUdpAddress *T ...@@ -150,7 +150,7 @@ static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddressEx(IWSDUdpAddress *T
switch (((SOCKADDR_IN *) &impl->sockAddr)->sin_family) switch (((SOCKADDR_IN *) &impl->sockAddr)->sin_family)
{ {
case AF_INET: case AF_INET:
size = sizeof(impl->ipv4Address) / sizeof(WCHAR); size = ARRAY_SIZE(impl->ipv4Address);
if (WSAAddressToStringW((LPSOCKADDR) &impl->sockAddr, sizeof(SOCKADDR_IN), NULL, impl->ipv4Address, &size) == 0) if (WSAAddressToStringW((LPSOCKADDR) &impl->sockAddr, sizeof(SOCKADDR_IN), NULL, impl->ipv4Address, &size) == 0)
{ {
...@@ -161,7 +161,7 @@ static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddressEx(IWSDUdpAddress *T ...@@ -161,7 +161,7 @@ static HRESULT WINAPI IWSDUdpAddressImpl_GetTransportAddressEx(IWSDUdpAddress *T
break; break;
case AF_INET6: case AF_INET6:
size = sizeof(impl->ipv6Address) / sizeof(WCHAR); size = ARRAY_SIZE(impl->ipv6Address);
/* Copy the SOCKADDR structure so we can remove the scope ID if not required */ /* Copy the SOCKADDR structure so we can remove the scope ID if not required */
memcpy(&storage, &impl->sockAddr, sizeof(SOCKADDR_IN6)); memcpy(&storage, &impl->sockAddr, sizeof(SOCKADDR_IN6));
......
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