diff options
author | Glenn L McGrath | 2001-10-05 05:24:19 +0000 |
---|---|---|
committer | Glenn L McGrath | 2001-10-05 05:24:19 +0000 |
commit | 1d098cefe242f2c1a6195a27fd92f81412509bde (patch) | |
tree | c6c755e9139c83e4244a8bf01a8cd3168710720c | |
parent | bf265daa470d7647abb7d8738c6f6365bb3478f3 (diff) | |
download | busybox-1d098cefe242f2c1a6195a27fd92f81412509bde.zip busybox-1d098cefe242f2c1a6195a27fd92f81412509bde.tar.gz |
Use wfopen instead of fopen & error_msg, saves 64 bytes
-rw-r--r-- | coreutils/tee.c | 3 | ||||
-rw-r--r-- | tee.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/coreutils/tee.c b/coreutils/tee.c index 439cf7d..64a0922 100644 --- a/coreutils/tee.c +++ b/coreutils/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; } } @@ -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; } } |