repo.or.cz
/
qemu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
spapr: fix spapr-nvram migration
[qemu.git]
/
scripts
/
coccinelle
/
return_directly.cocci
blob
48680f2c2a73b073caa9180c163c73b6bea34d2e
1
// replace 'R = X; return R;' with 'return R;'
2
@@
3
identifier VAR;
4
expression E;
5
type T;
6
identifier F;
7
@@
8
T F(...)
9
{
10
...
11
- T VAR;
12
... when != VAR
13
14
- VAR =
15
+ return
16
E;
17
- return VAR;
18
... when != VAR
19
}