summaryrefslogtreecommitdiff
path: root/cut.c
diff options
context:
space:
mode:
Diffstat (limited to 'cut.c')
-rw-r--r--cut.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cut.c b/cut.c
index abe0572..3ed2648 100644
--- a/cut.c
+++ b/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);
}