From 3dcda87e586d9d99052e55c3d339d3ba12149a11 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Wed, 23 Apr 2025 16:57:42 +0200 Subject: [PATCH] MINOR: h3: simplify h3_rcv_buf return path Remove return statement in h3_rcv_buf() in case of stream/connection error. Instead, reuse already existing label err. This simplifies the code path. It also fixes the missing leave trace for these cases. --- src/h3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/h3.c b/src/h3.c index 0f15a8935..eb1ff3575 100644 --- a/src/h3.c +++ b/src/h3.c @@ -1522,11 +1522,13 @@ static ssize_t h3_rcv_buf(struct qcs *qcs, struct buffer *b, int fin) if (h3s->err) { qcc_abort_stream_read(qcs); qcc_reset_stream(qcs, h3s->err); - return b_data(b); + total = b_data(b); + goto done; } else if (h3c->err) { qcc_set_error(qcs->qcc, h3c->err, 1); - return b_data(b); + total = b_data(b); + goto done; } else if (unlikely(ret < 0)) { qcc_set_error(qcs->qcc, H3_ERR_INTERNAL_ERROR, 1);