repo.or.cz
/
qemu
/
kevin.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
hostmem-memfd: disable for systems without sealing support
[qemu/kevin.git]
/
scripts
/
coccinelle
/
remove_local_err.cocci
blob
9261c99687a9e60ecbf40f06cdc08bdaf8728aeb
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
}