mirror of
https://github.com/openssl/openssl.git
synced 2025-01-24 13:55:42 +08:00
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)
This commit is contained in:
parent
1555c86e5f
commit
71faab72b8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user