aboutsummaryrefslogtreecommitdiff
path: root/tee.c
diff options
context:
space:
mode:
Diffstat (limited to 'tee.c')
-rw-r--r--tee.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tee.c b/tee.c
index 439cf7dc5..64a0922b7 100644
--- a/tee.c
+++ b/tee.c
@@ -45,9 +45,8 @@ tee_main(int argc, char **argv)
files = (FILE **)xmalloc(sizeof(FILE *) * (argc - optind + 1));
files[nfiles++] = stdout;
while (optind < argc) {
- if ((files[nfiles++] = fopen(argv[optind++], mode)) == NULL) {
+ if ((files[nfiles++] = wfopen(argv[optind++], mode)) == NULL) {
nfiles--;
- perror_msg("%s", argv[optind-1]);
status = 1;
}
}