From: Amaury Denoyelle Date: Fri, 22 Apr 2022 07:47:58 +0000 (+0200) Subject: BUG/MINOR: mux-quic: remove dead code in qcs_xfer_data() X-Git-Tag: v2.6-dev7~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3eb892fd6501a51a6da2dd5b1c96636986052bd8;p=thirdparty%2Fhaproxy.git BUG/MINOR: mux-quic: remove dead code in qcs_xfer_data() Since previous patch MINOR: mux-quic: split xfer and STREAM frames build there is no way to report an error in qcs_xfer_data(). This should fix github issue #1669. --- diff --git a/src/mux_quic.c b/src/mux_quic.c index c0ab6151ce..da322c060f 100644 --- a/src/mux_quic.c +++ b/src/mux_quic.c @@ -563,7 +563,7 @@ static void qc_release(struct qcc *qcc) * repeatdly this function on multiple streams before passing the data to the * lower layer. * - * Returns the total bytes of newly transferred data or a negative error code. + * Returns the total bytes of newly transferred data. It may be 0 if none. */ static int qcs_xfer_data(struct qcs *qcs, struct buffer *out, struct buffer *payload, uint64_t max_data) @@ -621,10 +621,6 @@ static int qcs_xfer_data(struct qcs *qcs, struct buffer *out, } return total; - - err: - TRACE_DEVEL("leaving in error", QMUX_EV_QCS_SEND, qcc->conn, qcs); - return -1; } static int qcs_build_stream_frm(struct qcs *qcs, struct buffer *out, char fin, @@ -871,8 +867,6 @@ static int _qc_send_qcs(struct qcs *qcs, struct list *frms, /* Transfer data from to . */ if (b_data(buf)) { xfer = qcs_xfer_data(qcs, out, buf, qcc_max_data); - BUG_ON(xfer < 0); /* TODO handle this properly */ - if (xfer > 0) { qcs_notify_send(qcs); qcs->flags &= ~QC_SF_BLK_MROOM;