Skip to content

Commit

Permalink
Remove allocation from MsQuicAddressHelpers.IPEndPointToINet (#54095)
Browse files Browse the repository at this point in the history
Assuming that GetAddressBytes() does not have side effects, this call
should not be needed.

Clean up from #53461
  • Loading branch information
AustinWise committed Jun 14, 2021
1 parent 5bf0a3f commit af5c238
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ internal static unsafe IPEndPoint INetToIPEndPoint(ref SOCKADDR_INET inetAddress
internal static unsafe SOCKADDR_INET IPEndPointToINet(IPEndPoint endpoint)
{
SOCKADDR_INET socketAddress = default;
byte[] buffer = endpoint.Address.GetAddressBytes();
if (endpoint.Address != IPAddress.Any && endpoint.Address != IPAddress.IPv6Any)
{
switch (endpoint.Address.AddressFamily)
Expand Down

0 comments on commit af5c238

Please sign in to comment.