]> Git Repo - qemu.git/blob - scripts/coccinelle/return_directly.cocci
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
[qemu.git] / scripts / coccinelle / return_directly.cocci
1 // replace 'R = X; return R;' with 'return X;'
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  }
This page took 0.02585 seconds and 4 git commands to generate.