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
/
redundant-if.cocci
blob
6582d6373b59702a9c6e2e89926b96e55320ee94
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2
@@
3
expression r;
4
@@
5
- if (r < 0)
6
- return r;
7
- if (r == 0)
8
- return 0;
9
+ if (r <= 0)
10
+ return r;
11
@@
12
expression r;
13
@@
14
- if (r == 0)
15
- return 0;
16
- if (r < 0)
17
- return r;
18
+ if (r <= 0)
19
+ return r;
20
@@
21
expression r;
22
@@
23
- if (r < 0)
24
- return r;
25
- if (r == 0)
26
- return r;
27
+ if (r <= 0)
28
+ return r;
29
@@
30
expression r;
31
@@
32
- if (r == 0)
33
- return r;
34
- if (r < 0)
35
- return r;
36
+ if (r <= 0)
37
+ return r;
38
@@
39
expression r;
40
@@
41
- if (r < 0)
42
- return r;
43
- if (r > 0)
44
- return r;
45
+ if (r != 0)
46
+ return r;
47
@@
48
expression r;
49
@@
50
- if (r > 0)
51
- return r;
52
- if (r < 0)
53
- return r;
54
+ if (r != 0)
55
+ return r;