SOCKET is unsigned on Windows, these is no need to cast
parameter. INVALID_SOCKET test should work on all platforms.
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Thu Apr 30 11:42:20 2026
(Merged from https://github.com/openssl/openssl/pull/30941)
time_t now;
#ifdef _WIN32
- if ((SOCKET)fd == INVALID_SOCKET)
+ if (fd == INVALID_SOCKET)
#else
if (fd < 0 || fd >= FD_SETSIZE)
#endif