1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00
systemd/coccinelle/take-fd.cocci

15 lines
154 B
Plaintext
Raw Normal View History

@@
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);