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 label Aug 1, 2020
lib/select.h Show resolved Hide resolved
@mback2k mback2k marked this pull request as ready for review Aug 2, 2020
@mback2k mback2k requested review from bagder, jay and MarcelRaad Aug 2, 2020
@bagder
bagder approved these changes 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 #5760
@mback2k mback2k force-pushed the mback2k:win32-invalid-socket branch from b182222 to b5b7710 Aug 3, 2020
@mback2k
Copy link
Member Author

@mback2k mback2k commented Aug 3, 2020

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

@jay
Copy link
Member

@jay 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.