Consolidate handling of some fopen failures.
This commit is contained in:
parent
e0bcce09ba
commit
bbaef66b3f
14 changed files with 32 additions and 73 deletions
|
@ -82,12 +82,8 @@ extern int more_main(int argc, char **argv)
|
|||
if (argc == 0) {
|
||||
file = stdin;
|
||||
} else
|
||||
file = fopen(*argv, "r");
|
||||
file = xfopen(*argv, "r");
|
||||
|
||||
if (file == NULL) {
|
||||
perror(*argv);
|
||||
exit(FALSE);
|
||||
}
|
||||
fstat(fileno(file), &st);
|
||||
|
||||
#ifdef BB_FEATURE_USE_TERMIOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue