]> git.ipfire.org Git - thirdparty/openssl.git/commit
Use INVALID_SOCKET in SSLEcho demo
authorMilan Broz <gmazyland@gmail.com>
Wed, 22 Apr 2026 13:34:05 +0000 (15:34 +0200)
committerNorbert Pocs <norbertp@openssl.org>
Thu, 30 Apr 2026 11:41:57 +0000 (13:41 +0200)
commit428bdb9c60da2cfdcab16fed7be8416bf96335df
tree14b3f13f4f1aec0b2b1aae8b6797175f9ee602da
parenta842afd126c36832d48f28aa2e98d34bf6107e8d
Use INVALID_SOCKET in SSLEcho demo

On Windows, SOCKET type is unsigned.

All comparison with negative value produces signed/unsigned
warnings, moreover the code is incorrect in error path.

Use INVALID_SOCKET define that should work on all
platforms to detect error.

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:31 2026
(Merged from https://github.com/openssl/openssl/pull/30941)
demos/sslecho/main.c