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.
This commit is contained in:
Amaury Denoyelle 2022-01-11 14:20:46 +01:00
parent 1aa57d32bb
commit ce340fe4a7
1 changed files with 1 additions and 1 deletions

View File

@ -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;