repo.or.cz
/
systemd_ALT.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
1:255.13-alt1
[systemd_ALT.git]
/
coccinelle
/
no-if-assignments.cocci
blob
9fbc018f11a9d360ac343e9b5284fe6a891cf0b8
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2
@@
3
expression p, q;
4
identifier r;
5
statement s;
6
@@
7
- if ((r = q) < p)
8
- s
9
+ r = q;
10
+ if (r < p)
11
+ s
12
@@
13
expression p, q;
14
identifier r;
15
statement s;
16
@@
17
- if ((r = q) >= p)
18
- s
19
+ r = q;
20
+ if (r >= p)
21
+ s