DEV: coccinelle: Add rule to use chunk_istcat() instead of chunk_strncat()

This replaces `chunk_strncat()` with `chunk_istcat()` if the parameters are the
ist's `.ptr` and `.len`.
This commit is contained in:
Tim Duesterhus 2021-11-08 09:05:03 +01:00 committed by Willy Tarreau
parent 755d2419a4
commit b9656e4837

View File

@ -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;
@@