From ce340fe4a72d987c95602e8c57a40dd5c6658b05 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Tue, 11 Jan 2022 14:20:46 +0100 Subject: [PATCH] MINOR: quic: fix return of quic_dgram_read It is expected that quic_dgram_read() returns the total number of bytes read. Fix the return value when the read has been successful. This bug has no impact as in the end the return value is not checked by the caller. --- 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 23eae2239..558e7048f 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -5371,7 +5371,7 @@ static ssize_t quic_dgram_read(struct buffer *buf, size_t len, void *owner, if (dgram_ctx.qc) dgram_ctx.qc->rx.bytes += len; - return pos - (unsigned char *)buf; + return pos - (unsigned char *)b_head(buf); err: return -1;