mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-26 19:22:57 -04:00
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:
parent
be2851f304
commit
fa9cefd277
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue