From: Amaury Denoyelle Date: Tue, 16 Aug 2022 12:41:57 +0000 (+0200) Subject: MINOR: quic: adjust quic_frame flag manipulation X-Git-Tag: v2.7-dev4~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f372e744dee12aafdfa9968dd0e0a0e5081d70ad;p=thirdparty%2Fhaproxy.git MINOR: quic: adjust quic_frame flag manipulation Replace a plain '=' operator by '|=' when setting quic_frame QUIC_FL_TX_FRAME_LOST flag. For the moment, this change has no impact as only two exclusive flags are defined for quic_frame. On the edited code path we are certain that QUIC_FL_TX_FRAME_ACKED is not set due to a previous if statement, so a plain equal or a binary OR is strictly identical. This change will be useful if new flags are defined for quic_frame in the future. These new flags won't be resetted automatically thanks to binary OR without explictly intended, which otherwise could easily lead to new bugs. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index bcd99ae702..e366e2049b 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -1783,7 +1783,7 @@ static inline void qc_requeue_nacked_pkt_tx_frms(struct quic_conn *qc, /* Mark this STREAM frame as lost. A look up their stream descriptor * will be performed to check the stream is not consumed or released. */ - frm->flags = QUIC_FL_TX_FRAME_LOST; + frm->flags |= QUIC_FL_TX_FRAME_LOST; } LIST_APPEND(&tmp, &frm->list); TRACE_DEVEL("frame requeued", QUIC_EV_CONN_PRSAFRM, qc, frm);