aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/wc.c6
-rw-r--r--wc.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 058444d89..d1e05ae37 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -136,16 +136,14 @@ int wc_main(int argc, char **argv)
} else if (argc == 1) {
file = fopen(*argv, "r");
if (file == NULL) {
- perror(*argv);
- exit(FALSE);
+ fatalError(*argv);
}
wc_file(file, *argv);
} else {
while (argc-- > 0) {
file = fopen(*argv, "r");
if (file == NULL) {
- perror(*argv);
- exit(FALSE);
+ fatalError(*argv);
}
wc_file(file, *argv);
argv++;
diff --git a/wc.c b/wc.c
index 058444d89..d1e05ae37 100644
--- a/wc.c
+++ b/wc.c
@@ -136,16 +136,14 @@ int wc_main(int argc, char **argv)
} else if (argc == 1) {
file = fopen(*argv, "r");
if (file == NULL) {
- perror(*argv);
- exit(FALSE);
+ fatalError(*argv);
}
wc_file(file, *argv);
} else {
while (argc-- > 0) {
file = fopen(*argv, "r");
if (file == NULL) {
- perror(*argv);
- exit(FALSE);
+ fatalError(*argv);
}
wc_file(file, *argv);
argv++;