summaryrefslogtreecommitdiff
path: root/admin/coccinelle/list_loop.cocci
blob: 89f0bfff7b37f2ba12737db78d7a5fc00f5fe24d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Omit redundant type check, consistently use CONSP.
@@
identifier A;
expression X;
statement S;
@@
(
for (A = X; 
- !NILP (A); 
+ CONSP (A);
- A = Fcdr (A))
+ A = XCDR (A))
S
|
for (A = X; CONSP (A);
- A = Fcdr (A))
+ A = XCDR (A))
S
)