Skip to content

Conversation

@keith-horton
Copy link
Member

Found through a separate tool when I manually copied this header to that project.

Signed-off-by: Keith Horton <khorton@microsoft.com>
@ChrisGuzak
Copy link
Member

is it possible to create a test for this and similar cases?

@ChrisGuzak ChrisGuzak self-assigned this Nov 2, 2025
Comment on lines +795 to +796
const auto comparison{::memcmp(&lhs.m_sockaddr.Ipv6, &rhs.m_sockaddr.Ipv6, sizeof(SOCKADDR_IN6))};
return comparison < 0 ? -1 : (comparison > 0 ? 1 : 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anything take a dependency on this returning exactly -1, 0, or 1? Seems easier and more efficient to just return ::memcmp(...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. I thought about making it do just that. I'm going to add tests for this oddball scenario. I might change to just return what memcmp returns then.

@dunhor
Copy link
Member

dunhor commented Nov 4, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants