summaryrefslogtreecommitdiff
path: root/coccinelle/safe_close.cocci
blob: 6fedd804f2e3f8458439063d0ff7d988e9853565 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
@@
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);