DEV: coccinelle: Add rule to use `chunk_istcat()` instead of `chunk_memcat()`
This replaces `chunk_memcat()` with `chunk_istcat()` if the parameters are the ist's `.ptr` and `.len`.
This commit is contained in:
parent
2471f5c2b2
commit
755d2419a4
|
@ -52,6 +52,14 @@ expression e;
|
|||
- if (\(i.len\|istlen(i)\) > e) { i.len = e; }
|
||||
+ i = isttrim(i, e);
|
||||
|
||||
@@
|
||||
struct ist i;
|
||||
struct buffer *b;
|
||||
@@
|
||||
|
||||
- chunk_memcat(b, \(i.ptr\|istptr(i)\) , \(i.len\|istlen(i)\));
|
||||
+ chunk_istcat(b, i);
|
||||
|
||||
@@
|
||||
struct ist i;
|
||||
@@
|
||||
|
|
Loading…
Reference in New Issue