From: Hugo Landau Date: Tue, 28 Mar 2023 07:00:53 +0000 (+0100) Subject: QUIC CC: Tweaks X-Git-Tag: openssl-3.2.0-alpha1~931 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=422368aebd908d6966639597aab786ee12eb62f1;p=thirdparty%2Fopenssl.git QUIC CC: Tweaks Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/20423) --- diff --git a/test/quic_cc_test.c b/test/quic_cc_test.c index 3eef4d64a20..87f9e268d27 100644 --- a/test/quic_cc_test.c +++ b/test/quic_cc_test.c @@ -125,14 +125,14 @@ static int net_sim_init(struct net_sim *s, return 1; } -static void net_sim_cleanup(struct net_sim *s) +static void do_free(NET_PKT *pkt) { - NET_PKT *pkt; - - while ((pkt = ossl_pqueue_NET_PKT_pop(s->pkts)) != NULL) - OPENSSL_free(pkt); + OPENSSL_free(pkt); +} - ossl_pqueue_NET_PKT_free(s->pkts); +static void net_sim_cleanup(struct net_sim *s) +{ + ossl_pqueue_NET_PKT_pop_free(s->pkts, do_free); } static int net_sim_process(struct net_sim *s, size_t skip_forward); @@ -221,7 +221,7 @@ static int net_sim_process_one(struct net_sim *s, int skip_forward) if (ossl_time_compare(fake_time, pkt->determination_time) < 0) return 2; - if (!ossl_assert(!pkt->success || pkt->arrived)) + if (!TEST_true(!pkt->success || pkt->arrived)) return 0; if (!pkt->success) {