1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 06:52:22 +03:00
systemd/coccinelle/no-if-assignments.cocci

21 lines
200 B
Plaintext
Raw Normal View History

@@
expression p, q;
identifier r;
statement s;
@@
- if ((r = q) < p)
- s
+ r = q;
+ if (r < p)
+ s
@@
expression p, q;
identifier r;
statement s;
@@
- if ((r = q) >= p)
- s
+ r = q;
+ if (r >= p)
+ s