haproxy icon indicating copy to clipboard operation
haproxy copied to clipboard

src/quic_rx.c: dead code suspected by coverity

Open chipitsine opened this issue 3 years ago • 1 comments

Tool Name and Version

coverity

Code Report

*** CID 1523932:  Control flow issues  (DEADCODE)
/src/quic_rx.c: 2067 in quic_rx_pkt_retrieve_conn()
2061      out:
2062            TRACE_LEAVE(QUIC_EV_CONN_LPKT, qc);
2063            return qc;
2064     
2065      err:
2066            if (qc)
>>>     CID 1523932:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "(*qc).cntrs.dropped_pkt++;".
2067                    qc->cntrs.dropped_pkt++;
2068            else
2069                    HA_ATOMIC_INC(&prx_counters->dropped_pkt);
2070     
2071            TRACE_LEAVE(QUIC_EV_CONN_LPKT);
2072            return NULL;

Additional Information

No response

Output of haproxy -vv

no

chipitsine avatar Nov 10 '23 12:11 chipitsine

Coverity is right on this one, err label is now only used if qc is NULL. I will push a fix soon.

a-denoyelle avatar Nov 10 '23 14:11 a-denoyelle