Skip to content

Avoid using strcasecmp and unroll the comparison to 'snan' instead #39182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

kubamracek
Copy link
Contributor

No description provided.

@kubamracek kubamracek requested a review from mikeash September 4, 2021 21:26
if ((nptr[0] == 's' || nptr[0] == 'S') &&
(nptr[1] == 'n' || nptr[1] == 'N') &&
(nptr[2] == 'a' || nptr[2] == 'A') &&
(nptr[3] == 'n' || nptr[3] == 'N')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to check index 4 for NUL to be equivalent. Not sure what our actual requirements are here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, this is supposed to preserve existing behavior. Thanks for pointing that out!

@kubamracek
Copy link
Contributor Author

@swift-ci please test

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.

2 participants