]> git.ipfire.org Git - thirdparty/systemd.git/blob - coccinelle/no-if-assignments.cocci
docs: note that udev doesn't deal with binary attribute values (#11383)
[thirdparty/systemd.git] / coccinelle / no-if-assignments.cocci
1 @@
2 expression p, q;
3 identifier r;
4 statement s;
5 @@
6 - if ((r = q) < p)
7 - s
8 + r = q;
9 + if (r < p)
10 + s
11 @@
12 expression p, q;
13 identifier r;
14 statement s;
15 @@
16 - if ((r = q) >= p)
17 - s
18 + r = q;
19 + if (r >= p)
20 + s