diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-07-19 17:36:27 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-07-19 17:36:27 +0000 |
commit | a16c66335e24009c4cbcd57ce8205b4dfc7b099c (patch) | |
tree | 473d8971338e0fde2a9ba8bd627e79b476a85ccd /wc.c | |
parent | ae6eae02dd85a196a4545376a50166aede8ce7c1 (diff) | |
download | busybox-w32-a16c66335e24009c4cbcd57ce8205b4dfc7b099c.tar.gz busybox-w32-a16c66335e24009c4cbcd57ce8205b4dfc7b099c.tar.bz2 busybox-w32-a16c66335e24009c4cbcd57ce8205b4dfc7b099c.zip |
Use FatalError()
-Erik
Diffstat (limited to 'wc.c')
-rw-r--r-- | wc.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -136,16 +136,14 @@ int wc_main(int argc, char **argv) | |||
136 | } else if (argc == 1) { | 136 | } else if (argc == 1) { |
137 | file = fopen(*argv, "r"); | 137 | file = fopen(*argv, "r"); |
138 | if (file == NULL) { | 138 | if (file == NULL) { |
139 | perror(*argv); | 139 | fatalError(*argv); |
140 | exit(FALSE); | ||
141 | } | 140 | } |
142 | wc_file(file, *argv); | 141 | wc_file(file, *argv); |
143 | } else { | 142 | } else { |
144 | while (argc-- > 0) { | 143 | while (argc-- > 0) { |
145 | file = fopen(*argv, "r"); | 144 | file = fopen(*argv, "r"); |
146 | if (file == NULL) { | 145 | if (file == NULL) { |
147 | perror(*argv); | 146 | fatalError(*argv); |
148 | exit(FALSE); | ||
149 | } | 147 | } |
150 | wc_file(file, *argv); | 148 | wc_file(file, *argv); |
151 | argv++; | 149 | argv++; |