]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: htx: remove the unreachable "append_data" label in htx_reserve_max_data()
authorWilly Tarreau <w@1wt.eu>
Mon, 27 Jul 2026 09:02:52 +0000 (11:02 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Jul 2026 13:30:23 +0000 (15:30 +0200)
htx_reserve_max_data() carries an "append_data:" label which is never the target
of a goto: the function simply falls through it. It looks like a leftover from
htx_add_data(), which does use such a label. Let's drop it, the code is reached
by fallthrough anyway and an unused label is only confusing.

src/htx.c

index 7143e396156a4157c220da448df59797538ff344..4d2d4cf959b1289b54de7021a9077aa647380c28 100644 (file)
--- a/src/htx.c
+++ b/src/htx.c
@@ -1185,7 +1185,6 @@ struct htx_ret htx_reserve_max_data(struct htx *htx)
        if (room < len)
                len = room;
 
-append_data:
        htx_change_blk_value_len(htx, tailblk, sz+len);
 
        BUG_ON((int32_t)htx->tail_addr < 0);