From 19d34d244b46227e83ec43969f99c5e3b23ea01d Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Mon, 23 Feb 2015 01:57:37 +0100 Subject: 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. --- src/tee.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2