This replaces `chunk_strncat()` with `chunk_istcat()` if the parameters are the
ist's `.ptr` and `.len`.
---
 dev/coccinelle/ist.cocci | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dev/coccinelle/ist.cocci b/dev/coccinelle/ist.cocci
index 4945141b2..680afbade 100644
--- a/dev/coccinelle/ist.cocci
+++ b/dev/coccinelle/ist.cocci
@@ -60,6 +60,14 @@ struct buffer *b;
 - chunk_memcat(b, \(i.ptr\|istptr(i)\) , \(i.len\|istlen(i)\));
 + chunk_istcat(b, i);
 
+@@
+struct ist i;
+struct buffer *b;
+@@
+
+- chunk_strncat(b, \(i.ptr\|istptr(i)\) , \(i.len\|istlen(i)\));
++ chunk_istcat(b, i);
+
 @@
 struct ist i;
 @@
-- 
2.33.1


Reply via email to