mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-11 22:11:04 +01: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;
|
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
|
- i.ptr != NULL
|
||||||
+ isttest(i)
|
+ isttest(i)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user