diff options
author | J.W. Jagersma <jwjagersma@gmail.com> | 2022-10-01 18:44:38 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2022-11-14 07:47:53 +0000 |
commit | 71faab72b8b49819d8bcf065b039d1d840e8b76c (patch) | |
tree | fc585ba0ab59a8098c4c484f3c2e6421b44154b5 /crypto/bio | |
parent | 1555c86e5f7e3c46b4f696ed665c2f988976b81f (diff) |
Cast socklen_t to size_t in assert comparison
This causes a warning otherwise when socklen_t is signed (Watt32).
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/bss_dgram.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c index 97600e4cd3..6ec43b1bc5 100644 --- a/crypto/bio/bss_dgram.c +++ b/crypto/bio/bss_dgram.c @@ -765,7 +765,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), "calling getsockopt()"); } else { - OPENSSL_assert(sz <= sizeof(struct timeval)); + OPENSSL_assert((size_t)sz <= sizeof(struct timeval)); ret = (int)sz; } # endif @@ -816,7 +816,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr) ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), "calling getsockopt()"); } else { - OPENSSL_assert(sz <= sizeof(struct timeval)); + OPENSSL_assert((size_t)sz <= sizeof(struct timeval)); ret = (int)sz; } # endif |