Repository navigation
Commit 94414ca
s390/oprofile: make return of 0 explicit
Delete unnecessary local variable whose value is always 0 and that hides
the fact that the result is always 0.
A simplified version of the semantic patch that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
local idexpression ret;
expression e;
position p;
@@
-ret = 0;
... when != ret = e
return
- ret
+ 0
;
// </smpl>
[heiko.carstens: turn prepare_cpu_buffers into a void returning function]
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>1 parent 470ada6 commit 94414ca
1 file changed
Lines changed: 4 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | 214 | | |
| 215 | + | |
217 | 216 | | |
218 | | - | |
219 | 217 | | |
220 | 218 | | |
221 | 219 | | |
| |||
230 | 228 | | |
231 | 229 | | |
232 | 230 | | |
233 | | - | |
234 | | - | |
235 | 231 | | |
236 | 232 | | |
237 | 233 | | |
| |||
1107 | 1103 | | |
1108 | 1104 | | |
1109 | 1105 | | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
| 1106 | + | |
1113 | 1107 | | |
1114 | 1108 | | |
1115 | 1109 | | |
| |||
1156 | 1150 | | |
1157 | 1151 | | |
1158 | 1152 | | |
1159 | | - | |
| 1153 | + | |
1160 | 1154 | | |
1161 | 1155 | | |
1162 | 1156 | | |
| |||
0 commit comments