]> git.ipfire.org Git - thirdparty/systemd.git/blame - coccinelle/close-above-stdio.cocci
man: fix reference to sd_bus_add_fallback_vtable
[thirdparty/systemd.git] / coccinelle / close-above-stdio.cocci
CommitLineData
e7685a77
LP
1@@
2expression fd;
3@@
4- if (fd > 2)
5- safe_close(fd);
6+ safe_close_above_stdio(fd);
7@@
8expression fd;
9@@
10- if (fd > 2)
11- fd = safe_close(fd);
12+ fd = safe_close_above_stdio(fd);
13@@
14expression fd;
15@@
16- if (fd >= 3)
17- safe_close(fd);
18+ safe_close_above_stdio(fd);
19@@
20expression fd;
21@@
22- if (fd >= 3)
23- fd = safe_close(fd);
24+ fd = safe_close_above_stdio(fd);
25@@
26expression fd;
27@@
28- if (fd > STDERR_FILENO)
29- safe_close(fd);
30+ safe_close_above_stdio(fd);
31@@
32expression fd;
33@@
34- if (fd > STDERR_FILENO)
35- fd = safe_close(fd);
36+ fd = safe_close_above_stdio(fd);