]> Git Repo - qemu.git/blob - scripts/coccinelle/remove_local_err.cocci
linux-user: fix GPROF build failure
[qemu.git] / scripts / coccinelle / remove_local_err.cocci
1 // Replace unnecessary usage of local_err variable with
2 // direct usage of errp argument
3
4 @@
5 identifier F;
6 expression list ARGS;
7 expression F2;
8 identifier LOCAL_ERR;
9 identifier ERRP;
10 idexpression V;
11 typedef Error;
12 @@
13  F(..., Error **ERRP)
14  {
15      ...
16 -    Error *LOCAL_ERR;
17      ... when != LOCAL_ERR
18          when != ERRP
19 (
20 -    F2(ARGS, &LOCAL_ERR);
21 -    error_propagate(ERRP, LOCAL_ERR);
22 +    F2(ARGS, ERRP);
23 |
24 -    V = F2(ARGS, &LOCAL_ERR);
25 -    error_propagate(ERRP, LOCAL_ERR);
26 +    V = F2(ARGS, ERRP);
27 )
28      ... when != LOCAL_ERR
29  }
This page took 0.025385 seconds and 4 git commands to generate.