summaryrefslogtreecommitdiffstats
path: root/test/quic_cc_test.c
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-03-28 09:00:53 +0200
committerMatt Caswell <matt@openssl.org>2023-05-01 12:03:54 +0200
commit422368aebd908d6966639597aab786ee12eb62f1 (patch)
treed7da7ad7931e4d648022c711663a169a1fc31905 /test/quic_cc_test.c
parentQUIC CC: Safe multiplication (diff)
downloadopenssl-422368aebd908d6966639597aab786ee12eb62f1.tar.xz
openssl-422368aebd908d6966639597aab786ee12eb62f1.zip
QUIC CC: Tweaks
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20423)
Diffstat (limited to 'test/quic_cc_test.c')
-rw-r--r--test/quic_cc_test.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/quic_cc_test.c b/test/quic_cc_test.c
index 3eef4d64a2..87f9e268d2 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) {