1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 10:25:06 +03:00
systemd-stable/coccinelle/safe_close.cocci

19 lines
216 B
Plaintext
Raw Normal View History

@@
expression fd;
@@
- close(fd);
- fd = -1;
+ fd = safe_close(fd);
@@
expression fd;
@@
- close_nointr(fd);
- fd = -1;
+ fd = safe_close(fd);
@@
expression fd;
@@
- safe_close(fd);
- fd = -1;
+ fd = safe_close(fd);