From: Frédéric Lécaille Date: Wed, 24 May 2023 08:24:42 +0000 (+0200) Subject: CLEANUP: quic: Useless tests in qc_rx_pkt_handle() X-Git-Tag: v2.8-dev13~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=464281af463f4058d4ef47ef1dbf5e2241eb08b1;p=thirdparty%2Fhaproxy.git CLEANUP: quic: Useless tests in qc_rx_pkt_handle() There is no reason to test nullity at the end of this function because it is clearly not null, furthermore the trace handle the case where is null. Must be backported to 2.7. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index 0e065ebbd0..4b8ac5bc29 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -7373,8 +7373,8 @@ static void qc_rx_pkt_handle(struct quic_conn *qc, struct quic_rx_packet *pkt, drop: HA_ATOMIC_INC(&qc->prx_counters->dropped_pkt); - TRACE_PROTO("packet drop", QUIC_EV_CONN_LPKT, qc ? qc : NULL, pkt, NULL, qv); - TRACE_LEAVE(QUIC_EV_CONN_LPKT, qc ? qc : NULL); + TRACE_PROTO("packet drop", QUIC_EV_CONN_LPKT, qc, pkt, NULL, qv); + TRACE_LEAVE(QUIC_EV_CONN_LPKT, qc); } /* This function builds into a buffer at position a QUIC long packet header,