From 7d845f15fd438a2cecd6758e5081b160afb8cc8c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 21 Feb 2022 19:22:09 +0100 Subject: [PATCH] CLEANUP: quic: Useless tests in qc_try_rm_hp() There is no need to test . Furthermore the packet type has already checked by the caller. --- src/xprt_quic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 314ed2a9de..cb99826ceb 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -3805,7 +3805,7 @@ static inline int qc_try_rm_hp(struct quic_conn *qc, pkt->aad_len = pn - beg + pkt->pnl; qpkt_trace = pkt; } - else if (qel) { + else { if (qel->tls_ctx.rx.flags & QUIC_FL_TLS_SECRETS_DCD) { /* If the packet number space has been discarded, this packet * will be not parsed. @@ -3819,10 +3819,6 @@ static inline int qc_try_rm_hp(struct quic_conn *qc, MT_LIST_APPEND(&qel->rx.pqpkts, &pkt->list); quic_rx_packet_refinc(pkt); } - else { - TRACE_PROTO("Unknown packet type", QUIC_EV_CONN_TRMHP, qc); - goto err; - } *el = qel; /* No reference counter incrementation here!!! */ -- 2.47.3