]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: quic: Useless tests in qc_rx_pkt_handle()
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 24 May 2023 08:24:42 +0000 (10:24 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 May 2023 14:30:11 +0000 (16:30 +0200)
There is no reason to test <qc> nullity at the end of this function because it is
clearly not null, furthermore the trace handle the case where <qc> is null.

Must be backported to 2.7.

src/quic_conn.c

index 0e065ebbd07b1648893f52ba179e6d2fa224c1cf..4b8ac5bc297c53fb111b7f954e909c13da56b8d7 100644 (file)
@@ -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 <pos> position a QUIC long packet header,