]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix signed/unsigned comparison under MINGW64
authorMilan Broz <gmazyland@gmail.com>
Wed, 22 Apr 2026 13:00:49 +0000 (15:00 +0200)
committerNorbert Pocs <norbertp@openssl.org>
Thu, 30 Apr 2026 11:41:56 +0000 (13:41 +0200)
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)

crypto/bio/bio_sock.c

index 5b793b9af1d1a82b8a9ec2a78d823f41c09a18ee..44e8f622aefa6fb2377d7381b7b3d8179d20bb57 100644 (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