Fix signed/unsigned comparison under MINGW64

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)
This commit is contained in:
Milan Broz
2026-04-22 15:00:49 +02:00
committed by Norbert Pocs
parent d59b644e3c
commit 237916a30d
+1 -1
View File
@@ -437,7 +437,7 @@ int BIO_socket_wait(int fd, int for_read, time_t max_time)
time_t now;
#ifdef _WIN32
if ((SOCKET)fd == INVALID_SOCKET)
if (fd == INVALID_SOCKET)
#else
if (fd < 0 || fd >= FD_SETSIZE)
#endif