summaryrefslogtreecommitdiff
path: root/coreutils/cut.c
diff options
context:
space:
mode:
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);
}