mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-18 03:26:55 +00:00
DEV: coccinelle: Add rule to use istnext()
where possible
This matches both `istadv(..., 1)` as well as raw `.ptr++` uses.
This commit is contained in:
parent
025b93e3a2
commit
ef00c533e1
@ -26,6 +26,22 @@ expression e;
|
||||
struct ist i;
|
||||
@@
|
||||
|
||||
- i = istadv(i, 1);
|
||||
+ i = istnext(i);
|
||||
|
||||
@@
|
||||
struct ist i;
|
||||
expression e;
|
||||
@@
|
||||
|
||||
- i.ptr++;
|
||||
- i.len--;
|
||||
+ i = istnext(i);
|
||||
|
||||
@@
|
||||
struct ist i;
|
||||
@@
|
||||
|
||||
- i.ptr != NULL
|
||||
+ isttest(i)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user