CLEANUP: http_htx: rename inner 'type' to 'ptype' to avoid variable shadowing

In http_add_header() there are "type" variables of the same type at two
levels, which is a bit confusing. The inner one is for the "prev" block,
so let's rename it "ptype" by analogy with "pblk".
This commit is contained in:
Willy Tarreau 2026-05-11 14:39:16 +02:00
parent be2851f304
commit fa9cefd277

View file

@ -301,7 +301,7 @@ int http_add_header(struct htx *htx, const struct ist n, const struct ist v, int
* it just before the end-of-header block. So blocks remains ordered. */
for (prev = htx_get_prev(htx, htx->tail); prev != htx->first; prev = htx_get_prev(htx, prev)) {
struct htx_blk *pblk = htx_get_blk(htx, prev);
enum htx_blk_type type = htx_get_blk_type(pblk);
enum htx_blk_type ptype = htx_get_blk_type(pblk);
/* Swap .addr and .info fields */
blk->addr ^= pblk->addr; pblk->addr ^= blk->addr; blk->addr ^= pblk->addr;
@ -311,7 +311,7 @@ int http_add_header(struct htx *htx, const struct ist n, const struct ist v, int
blk->addr += htx_get_blksz(pblk);
/* Stop when end-of-header is reached */
if (type == HTX_BLK_EOH)
if (ptype == HTX_BLK_EOH)
break;
blk = pblk;