mirror of https://github.com/openssl/openssl
QUIC: Use ossl_assert
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19703)
This commit is contained in:
parent
2d2fd151d4
commit
79534440c5
|
@ -1481,8 +1481,9 @@ static int ch_discard_el(QUIC_CHANNEL *ch,
|
|||
ossl_ackm_on_pkt_space_discarded(ch->ackm, pn_space);
|
||||
|
||||
/* We should still have crypto streams at this point. */
|
||||
assert(ch->crypto_send[pn_space] != NULL);
|
||||
assert(ch->crypto_recv[pn_space] != NULL);
|
||||
if (!ossl_assert(ch->crypto_send[pn_space] != NULL)
|
||||
|| !ossl_assert(ch->crypto_recv[pn_space] != NULL))
|
||||
return 0;
|
||||
|
||||
/* Get rid of the crypto stream state for the EL. */
|
||||
ossl_quic_sstream_free(ch->crypto_send[pn_space]);
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
#include "internal/quic_reactor.h"
|
||||
#include "internal/common.h"
|
||||
|
||||
/*
|
||||
* Core I/O Reactor Framework
|
||||
|
@ -159,7 +160,8 @@ static int poll_two_fds(int rfd, int rfd_want_read,
|
|||
if (wfd > maxfd)
|
||||
maxfd = wfd;
|
||||
|
||||
if (rfd == -1 && wfd == -1 && ossl_time_is_infinite(deadline))
|
||||
if (!ossl_assert(rfd != -1 || wfd != -1
|
||||
|| !ossl_time_is_infinite(deadline)))
|
||||
/* Do not block forever; should not happen. */
|
||||
return 0;
|
||||
|
||||
|
@ -210,7 +212,7 @@ static int poll_two_fds(int rfd, int rfd_want_read,
|
|||
++npfd;
|
||||
}
|
||||
|
||||
if (npfd == 0 && ossl_time_is_infinite(deadline))
|
||||
if (!ossl_assert(npfd != 0 || !ossl_time_is_infinite(deadline)))
|
||||
/* Do not block forever; should not happen. */
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue