CLEANUP: Apply ist.cocci
This is to make use of `chunk_istcat()`.
diff --git a/src/cache.c b/src/cache.c
index e871a7b..ee42947 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1644,7 +1644,7 @@
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 aa4965d..99dc89a 100644
--- a/src/http_fetch.c
+++ b/src/http_fetch.c
@@ -874,7 +874,7 @@
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 6b06336..3535fa7 100644
--- a/src/http_htx.c
+++ b/src/http_htx.c
@@ -432,7 +432,7 @@
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 @@
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 f20b46b..ba3a546 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -1242,17 +1242,17 @@
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 @@
/* 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 @@
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 bf497fe..294e49b 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -429,7 +429,7 @@
* 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 @@
* 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);