This is to make use of `chunk_istcat()`. --- src/cache.c | 2 +- src/http_fetch.c | 2 +- src/http_htx.c | 4 ++-- src/mux_fcgi.c | 10 +++++----- src/tcpcheck.c | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/cache.c b/src/cache.c index e871a7b30..ee42947c1 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1644,7 +1644,7 @@ int sha1_hosturi(struct stream *s) chunk_istcat(trash, ctx.value); } - chunk_memcat(trash, uri.ptr, uri.len); + chunk_istcat(trash, uri); /* hash everything */ blk_SHA1_Init(&sha1_ctx); diff --git a/src/http_fetch.c b/src/http_fetch.c index aa4965d0f..99dc89a51 100644 --- a/src/http_fetch.c +++ b/src/http_fetch.c @@ -874,7 +874,7 @@ static int smp_fetch_hdr_names(const struct arg *args, struct sample *smp, const if (temp->data) temp->area[temp->data++] = del; - chunk_memcat(temp, n.ptr, n.len); + chunk_istcat(temp, n); } smp->data.type = SMP_T_STR; diff --git a/src/http_htx.c b/src/http_htx.c index 6b06336e6..3535fa713 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -432,7 +432,7 @@ int http_replace_req_path(struct htx *htx, const struct ist path, int with_qs) vsn = ist2(temp->area + meth.len, HTX_SL_REQ_VLEN(sl)); chunk_memcat(temp, uri.ptr, p.ptr - uri.ptr); /* uri: host part */ - chunk_memcat(temp, path.ptr, path.len); /* uri: new path */ + chunk_istcat(temp, path); /* uri: new path */ chunk_memcat(temp, p.ptr + plen, p.len - plen); /* uri: QS part */ uri = ist2(temp->area + meth.len + vsn.len, uri.len - plen + path.len); @@ -711,7 +711,7 @@ int http_update_authority(struct htx *htx, struct htx_sl *sl, const struct ist h vsn = ist2(temp->area + meth.len, HTX_SL_REQ_VLEN(sl)); chunk_memcat(temp, uri.ptr, authority.ptr - uri.ptr); - chunk_memcat(temp, host.ptr, host.len); + chunk_istcat(temp, host); chunk_memcat(temp, istend(authority), istend(uri) - istend(authority)); uri = ist2(temp->area + meth.len + vsn.len, host.len + uri.len - authority.len); /* uri */ diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index f20b46b71..ba3a54617 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -1242,17 +1242,17 @@ static int fcgi_set_default_param(struct fcgi_conn *fconn, struct fcgi_strm *fst if (!(params->mask & FCGI_SP_REQ_METH)) { p = htx_sl_req_meth(sl); params->meth = ist2(b_tail(params->p), p.len); - chunk_memcat(params->p, p.ptr, p.len); + chunk_istcat(params->p, p); } if (!(params->mask & FCGI_SP_REQ_URI)) { p = h1_get_uri(sl); params->uri = ist2(b_tail(params->p), p.len); - chunk_memcat(params->p, p.ptr, p.len); + chunk_istcat(params->p, p); } if (!(params->mask & FCGI_SP_SRV_PROTO)) { p = htx_sl_req_vsn(sl); params->vsn = ist2(b_tail(params->p), p.len); - chunk_memcat(params->p, p.ptr, p.len); + chunk_istcat(params->p, p); } if (!(params->mask & FCGI_SP_SRV_PORT)) { char *end; @@ -1361,7 +1361,7 @@ static int fcgi_set_default_param(struct fcgi_conn *fconn, struct fcgi_strm *fst /* Decode the path. it must first be copied to keep the URI * untouched. */ - chunk_memcat(params->p, path.ptr, path.len); + chunk_istcat(params->p, path); path.ptr = b_tail(params->p) - path.len; len = url_decode(ist0(path), 0); if (len < 0) @@ -1415,7 +1415,7 @@ static int fcgi_set_default_param(struct fcgi_conn *fconn, struct fcgi_strm *fst struct ist sn = params->scriptname; params->scriptname = ist2(b_tail(params->p), len+fconn->app->index.len); - chunk_memcat(params->p, sn.ptr, sn.len); + chunk_istcat(params->p, sn); chunk_memcat(params->p, fconn->app->index.ptr, fconn->app->index.len); } } diff --git a/src/tcpcheck.c b/src/tcpcheck.c index bf497fec5..294e49bcc 100644 --- a/src/tcpcheck.c +++ b/src/tcpcheck.c @@ -429,7 +429,7 @@ static void tcpcheck_expect_onerror_message(struct buffer *msg, struct check *ch * 4. Otherwise produce the generic tcp-check info message */ if (istlen(info)) { - chunk_strncat(msg, istptr(info), istlen(info)); + chunk_istcat(msg, info); goto comment; } else if (!LIST_ISEMPTY(&rule->expect.onerror_fmt)) { @@ -517,7 +517,7 @@ static void tcpcheck_expect_onsuccess_message(struct buffer *msg, struct check * * 4. Otherwise produce the generic tcp-check info message */ if (istlen(info)) - chunk_strncat(msg, istptr(info), istlen(info)); + chunk_istcat(msg, info); if (!LIST_ISEMPTY(&rule->expect.onsuccess_fmt)) msg->data += sess_build_logline(check->sess, NULL, b_tail(msg), b_room(msg), &rule->expect.onsuccess_fmt); -- 2.33.1