mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-04 16:13:45 +02: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:
committed by
Willy Tarreau
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user