summaryrefslogtreecommitdiffstats
path: root/coccinelle/dup-fcntl.cocci
blob: 8b133b3a24f6547062dd1c0d803dace33c94cd6a (plain)
1
2
3
4
5
6
7
@@
/* We want to stick with dup() in test-fd-util.c */
position p : script:python() { p[0].file != "src/test/test-fd-util.c" };
expression fd;
@@
- dup@p(fd)
+ fcntl(fd, F_DUPFD, 3)