Skip to content
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

select.h: make socket validation macros test for INVALID_SOCKET #5760

Closed
wants to merge 1 commit into from

Conversation

mback2k
Copy link
Member

@mback2k mback2k commented Aug 1, 2020

With Winsock the valid range is between 0 and INVALID_SOCKET-1 according to:
https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2

@mback2k mback2k added the Windows Windows-specific label Aug 1, 2020
lib/select.h Show resolved Hide resolved
@mback2k mback2k marked this pull request as ready for review August 2, 2020 15:34
@mback2k mback2k added the feature-window A merge of this requires an open feature window label Aug 2, 2020
With Winsock the valid range is [0..INVALID_SOCKET-1] according to
https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg

Closes curl#5760
@mback2k
Copy link
Member Author

mback2k commented Aug 3, 2020

@jay please take another look, I slightly updated the comment according to your feedback.

@jay
Copy link
Member

jay commented Aug 3, 2020

Looks fine Marc. IMO the code should speak for itself when it can and does here. If you think the extra sentence on winsock is necessary that's fine I'm not against it.

@mback2k mback2k self-assigned this Aug 25, 2020
@mback2k mback2k closed this in 0f7c332 Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-window A merge of this requires an open feature window Windows Windows-specific
Development

Successfully merging this pull request may close these issues.

None yet

4 participants