aboutsummaryrefslogtreecommitdiffstats
path: root/src/tee.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-08-25 14:32:02 +0000
committerJim Meyering <jim@meyering.net>2002-08-25 14:32:02 +0000
commit3124a4e39341371d69097cf276fc00bd65a0e5f1 (patch)
tree9d09a01198e030ddf72ba599dea3fa7c2631b3a9 /src/tee.c
parentlatest (diff)
downloadcoreutils-3124a4e39341371d69097cf276fc00bd65a0e5f1.tar.gz
coreutils-3124a4e39341371d69097cf276fc00bd65a0e5f1.zip
(main): Close STDIN_FILENO rather than a literal `0'.
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tee.c b/src/tee.c
index c71797a47..6fdd5f7e6 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -1,5 +1,5 @@
/* tee - read from standard input and write to standard output and files.
- Copyright (C) 85,1990-2001 Free Software Foundation, Inc.
+ Copyright (C) 85,1990-2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -147,7 +147,7 @@ main (int argc, char **argv)
POSIX requires that it work when given no arguments. */
errs = tee (argc - optind, (const char **) &argv[optind]);
- if (close (0) != 0)
+ if (close (STDIN_FILENO) != 0)
error (1, errno, _("standard input"));
exit (errs);