summaryrefslogtreecommitdiff
path: root/src/printenv.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-14 15:36:50 +0000
committerJim Meyering <jim@meyering.net>1999-01-14 15:36:50 +0000
commitdc4fd4c43b21e3c7043d963f1ecbae5716f06e61 (patch)
tree9e6aecb5ea09429a620ae523baed89bb60889858 /src/printenv.c
parent26ba9ca9df0b37d5f22f1592e9406cd84096f2f0 (diff)
downloadcoreutils-dc4fd4c43b21e3c7043d963f1ecbae5716f06e61.tar.xz
Include closeout.h. (main): Use close_stdout_status.
Diffstat (limited to 'src/printenv.c')
-rw-r--r--src/printenv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/printenv.c b/src/printenv.c
index b334d8e74..8a85157e3 100644
--- a/src/printenv.c
+++ b/src/printenv.c
@@ -1,5 +1,5 @@
/* printenv -- print all or part of environment
- Copyright (C) 89,90,91,92,93,94,95,96,1997 Free Software Foundation, Inc.
+ Copyright (C) 89,90,91,92,93,94,95,96,1997, 1999 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
@@ -33,6 +33,7 @@
#include <getopt.h>
#include "system.h"
+#include "closeout.h"
#include "error.h"
/* The name this program was run with. */
@@ -136,8 +137,7 @@ main (int argc, char **argv)
exit_status = (matches != argc - optind);
}
- if (ferror (stdout) || fclose (stdout) == EOF)
- error (2, errno, _("standard output"));
+ close_stdout_status (2);
exit (exit_status);
}