未验证 提交 af5c2385 编写于 作者: A Austin Wise 提交者: GitHub

Remove allocation from MsQuicAddressHelpers.IPEndPointToINet (#54095)

Assuming that GetAddressBytes() does not have side effects, this call
should not be needed.

Clean up from dotnet/runtime#53461
上级 5bf0a3f4
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册