summaryrefslogtreecommitdiffstats
path: root/coccinelle/take-fd.cocci
blob: ba242483cd50c7d9f30081fb46fb85af02187303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
@@
local idexpression p;
expression q;
@@
- p = q;
- q = -1;
- return p;
+ return TAKE_FD(q);
@@
expression p, q;
@@
- p = q;
- q = -1;
+ p = TAKE_FD(q);