From f372e744dee12aafdfa9968dd0e0a0e5081d70ad Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Tue, 16 Aug 2022 14:41:57 +0200 Subject: [PATCH] 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. --- src/xprt_quic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index bcd99ae70..e366e2049 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);