Sign in
code
/
git
/
05665a0dff77b5fc49e8e94b15087fb630a10ab0
/
.
/
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
(...);
}