Skip to content

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

Closed
mback2k wants to merge 1 commit intocurl:masterfrom
mback2k:win32-invalid-socket
Closed

select.h: make socket validation macros test for INVALID_SOCKET#5760
mback2k wants to merge 1 commit intocurl:masterfrom
mback2k:win32-invalid-socket

Conversation

@mback2k
Copy link
Copy Markdown
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
@mback2k mback2k marked this pull request as ready for review August 2, 2020 15:34
@mback2k mback2k requested review from MarcelRaad, bagder and jay 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 mback2k force-pushed the win32-invalid-socket branch from b182222 to b5b7710 Compare August 3, 2020 13:54
@mback2k
Copy link
Copy Markdown
Member Author

mback2k commented Aug 3, 2020

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

@jay
Copy link
Copy Markdown
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.

4 participants