summaryrefslogtreecommitdiff
path: root/coreutils/cut.c
diff options
context:
space:
mode:
authorEric Andersen2001-08-02 05:02:46 +0000
committerEric Andersen2001-08-02 05:02:46 +0000
commit34506361697643277042fc8d7294bc17a27d4e28 (patch)
treebf2c45a12020be4e0a37547abb50c40c0074e8ec /coreutils/cut.c
parent2d91deba45d5a284614e06cc55e2be03599ca26d (diff)
downloadbusybox-34506361697643277042fc8d7294bc17a27d4e28.zip
busybox-34506361697643277042fc8d7294bc17a27d4e28.tar.gz
Latest patch from vodz. Adds a check for divide by zero in the posix
math suport, cleaner math syntax error checking, moves redundant signal string tables (from kill and ash) into libbb and provides a few cleanups elsewhere.
Diffstat (limited to 'coreutils/cut.c')
-rw-r--r--coreutils/cut.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c
index abe0572..3ed2648 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -344,10 +344,8 @@ extern int cut_main(int argc, char **argv)
int i;
FILE *file;
for (i = optind; i < argc; i++) {
- file = fopen(argv[i], "r");
- if (file == NULL) {
- perror_msg("%s", argv[i]);
- } else {
+ file = wfopen(argv[i], "r");
+ if(file) {
cut_file(file);
fclose(file);
}