Sign in
googlers
/
jrn
/
git
/
5e18c82bb9ac28d482413466150f08a7d49230e9
/
.
/
contrib
/
coccinelle
/
xopen.cocci
blob: 814d7b8a1a1c75af49a1e648d96901587709329c [
file
] [
log
] [
blame
]
@@
identifier fd
;
identifier die_fn
=~
"^(die|die_errno)$"
;
@@
(
fd
=
-
open
+
xopen
(...);
|
int
fd
=
-
open
+
xopen
(...);
)
-
if
(
\( fd
<
0
\| fd
==
-
1
\)
)
{
die_fn
(...);
}