Browse Source
Error diagnostics improvement. * rs/xopen-reports-open-failures: use xopen() to handle fatal open(2) failures xopen: explicitly report creation failuresmaint

16 changed files with 36 additions and 53 deletions
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
@@ |
||||
identifier fd; |
||||
identifier die_fn =~ "^(die|die_errno)$"; |
||||
@@ |
||||
( |
||||
fd = |
||||
- open |
||||
+ xopen |
||||
(...); |
||||
| |
||||
int fd = |
||||
- open |
||||
+ xopen |
||||
(...); |
||||
) |
||||
- if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); } |
Loading…
Reference in new issue