summaryrefslogtreecommitdiffstats
path: root/coccinelle/dup-fcntl.cocci
blob: 2c87f70dc3d4fa1082dcd6404f4faed8390179df (plain)
1
2
3
4
5
6
7
8
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* 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)