summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2015-02-23 01:57:37 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2015-02-23 11:39:08 +0100
commit19d34d244b46227e83ec43969f99c5e3b23ea01d (patch)
tree51fca69e578fd191c3861140818ab179a96a32e1 /src
parent7ceaf1d975a17d07f1704d8edf4476218148cfba (diff)
downloadcoreutils-19d34d244b46227e83ec43969f99c5e3b23ea01d.tar.xz
tee: close "-" file
This is a cleanup to the previous commit v8.23-138-g7ceaf1d. * src/tee.c (tee_files): Do not exempt the "-" file from being closed, as this is no longer stdout but a normal file.
Diffstat (limited to 'src')
-rw-r--r--src/tee.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tee.c b/src/tee.c
index feb402628..27bd2a45d 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -213,8 +213,7 @@ tee_files (int nfiles, const char **files)
/* Close the files, but not standard output. */
for (i = 1; i <= nfiles; i++)
- if (!STREQ (files[i], "-")
- && descriptors[i] && fclose (descriptors[i]) != 0)
+ if (descriptors[i] && fclose (descriptors[i]) != 0)
{
error (0, errno, "%s", files[i]);
ok = false;