1
0
Fork 0
git/contrib/coccinelle/xopen.cocci
Daniel Baumann 54102a2c29
Adding upstream version 1:2.47.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-23 07:43:39 +02:00

19 lines
295 B
Text

@@
identifier fd;
identifier die_fn =~ "^(die|die_errno)$";
@@
int fd =
- open
+ xopen
(...);
- if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); }
@@
expression fd;
identifier die_fn =~ "^(die|die_errno)$";
@@
fd =
- open
+ xopen
(...);
- if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); }