]> git.ipfire.org Git - thirdparty/systemd.git/blob - coccinelle/redundant-if.cocci
dlfcn-util: add dlsym_many_and_warn() helper
[thirdparty/systemd.git] / coccinelle / redundant-if.cocci
1 @@
2 expression r;
3 @@
4 - if (r < 0)
5 - return r;
6 - if (r == 0)
7 - return 0;
8 + if (r <= 0)
9 + return r;
10 @@
11 expression r;
12 @@
13 - if (r == 0)
14 - return 0;
15 - if (r < 0)
16 - return r;
17 + if (r <= 0)
18 + return r;
19 @@
20 expression r;
21 @@
22 - if (r < 0)
23 - return r;
24 - if (r == 0)
25 - return r;
26 + if (r <= 0)
27 + return r;
28 @@
29 expression r;
30 @@
31 - if (r == 0)
32 - return r;
33 - if (r < 0)
34 - return r;
35 + if (r <= 0)
36 + return r;
37 @@
38 expression r;
39 @@
40 - if (r < 0)
41 - return r;
42 - if (r > 0)
43 - return r;
44 + if (r != 0)
45 + return r;
46 @@
47 expression r;
48 @@
49 - if (r > 0)
50 - return r;
51 - if (r < 0)
52 - return r;
53 + if (r != 0)
54 + return r;