]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEAUNUP: quic: Usage of a useless variable in qc_treat_rx_pkts()
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 4 Jun 2021 08:12:43 +0000 (10:12 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Sep 2021 13:27:25 +0000 (15:27 +0200)
The usage of a <drop> variable is unnecessary here.

src/xprt_quic.c

index 0337558693b60e77d4180adf5cf5f8880fbc9754..cb00c02fdc1cb006db41f1ae761d89bc34cea6ba 100644 (file)
@@ -2468,13 +2468,7 @@ int qc_treat_rx_pkts(struct quic_enc_level *el, struct quic_conn_ctx *ctx)
                                    QUIC_EV_CONN_ELRXPKTS, ctx->conn, pkt);
                }
                else {
-                       int drop;
-
-                       drop = 0;
-                       if (!qc_parse_pkt_frms(pkt, ctx, el))
-                               drop = 1;
-
-                       if (drop) {
+                       if (!qc_parse_pkt_frms(pkt, ctx, el)) {
                                /* Drop the packet */
                                TRACE_PROTO("packet parsing failed -> dropped",
                                            QUIC_EV_CONN_ELRXPKTS, ctx->conn, pkt);