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