From: Christopher Faulet Date: Tue, 28 Jul 2026 09:46:13 +0000 (+0200) Subject: CLEANUP: http-conf: rename local trash variable X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2b0e1caf6bf1a51c8f6b58b4d2aad8ebd3b3eac1;p=thirdparty%2Fhaproxy.git CLEANUP: http-conf: rename local trash variable In, sample_conv_url_enc(), the local trash variable was renamed to chk to avoid mix-up with the global variable. --- diff --git a/src/http_conv.c b/src/http_conv.c index 98e7d4f78..02c3a79b1 100644 --- a/src/http_conv.c +++ b/src/http_conv.c @@ -340,11 +340,11 @@ static int sample_conv_url_enc(const struct arg *args, struct sample *smp, void *private) { enum encode_type enc_type; - struct buffer *trash = get_trash_chunk_sz(smp->data.u.str.data); + struct buffer *chk = get_trash_chunk_sz(smp->data.u.str.data); long *encode_map; char *ret; - if (!trash) + if (!chk) return 0; enc_type = args->data.sint; @@ -354,12 +354,12 @@ static int sample_conv_url_enc(const struct arg *args, struct sample *smp, void else return 0; - ret = encode_chunk(trash->area, trash->area + trash->size, '%', + ret = encode_chunk(chk->area, chk->area + chk->size, '%', encode_map, &smp->data.u.str, 0); if (ret == NULL || *ret != '\0') return 0; - trash->data = ret - trash->area; - smp->data.u.str = *trash; + chk->data = ret - chk->area; + smp->data.u.str = *chk; return 1; }