]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/no-if-assignments.cocci
test/test-rpm-macros.sh: add build directory to pkg-config search path
[thirdparty/systemd.git] / coccinelle / no-if-assignments.cocci
CommitLineData
64b92d63 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
3cc2aff1
LP
2@@
3expression p, q;
4identifier r;
5statement s;
6@@
7- if ((r = q) < p)
8- s
9+ r = q;
10+ if (r < p)
11+ s
12@@
13expression p, q;
14identifier r;
15statement s;
16@@
17- if ((r = q) >= p)
18- s
19+ r = q;
20+ if (r >= p)
21+ s