diff options
Diffstat (limited to 'tee.c')
-rw-r--r-- | tee.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -45,9 +45,8 @@ tee_main(int argc, char **argv) | |||
45 | files = (FILE **)xmalloc(sizeof(FILE *) * (argc - optind + 1)); | 45 | files = (FILE **)xmalloc(sizeof(FILE *) * (argc - optind + 1)); |
46 | files[nfiles++] = stdout; | 46 | files[nfiles++] = stdout; |
47 | while (optind < argc) { | 47 | while (optind < argc) { |
48 | if ((files[nfiles++] = fopen(argv[optind++], mode)) == NULL) { | 48 | if ((files[nfiles++] = wfopen(argv[optind++], mode)) == NULL) { |
49 | nfiles--; | 49 | nfiles--; |
50 | perror_msg("%s", argv[optind-1]); | ||
51 | status = 1; | 50 | status = 1; |
52 | } | 51 | } |
53 | } | 52 | } |