mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-23 22:12:46 +00:00
DEV: coccinelle: Add rule to use isttrim()
where possible
This replaces `if (i.len > e) i.len = e;` by `isttrim(i, e)`.
This commit is contained in:
parent
e9f4d67b15
commit
9b80a6ca8f
@ -44,6 +44,14 @@ struct ist i;
|
||||
- (\(i.ptr\|istptr(i)\) + \(i.len\|istlen(i)\))
|
||||
+ istend(i)
|
||||
|
||||
@@
|
||||
struct ist i;
|
||||
expression e;
|
||||
@@
|
||||
|
||||
- if (\(i.len\|istlen(i)\) > e) { i.len = e; }
|
||||
+ i = isttrim(i, e);
|
||||
|
||||
@@
|
||||
struct ist i;
|
||||
@@
|
||||
|
Loading…
Reference in New Issue
Block a user