diff options
author | Jim Meyering <jim@meyering.net> | 1999-01-14 15:37:04 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-01-14 15:37:04 +0000 |
commit | da258119328fe4af0e0aa0d6f292600732aa0bb4 (patch) | |
tree | 3d4ab4a3c9d52bc28eb15293a5c0a096d7e7ec6f /src/hostid.c | |
parent | dc4fd4c43b21e3c7043d963f1ecbae5716f06e61 (diff) | |
download | coreutils-da258119328fe4af0e0aa0d6f292600732aa0bb4.tar.xz |
Include closeout.h. (main): Use close_stdout.
Diffstat (limited to 'src/hostid.c')
-rw-r--r-- | src/hostid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hostid.c b/src/hostid.c index 1b8cff5bc..558d6e401 100644 --- a/src/hostid.c +++ b/src/hostid.c @@ -1,5 +1,5 @@ /* print the hexadecimal identifier for the current host - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 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 @@ -25,6 +25,7 @@ #endif #include "system.h" +#include "closeout.h" #include "long-options.h" #include "error.h" @@ -73,8 +74,7 @@ main (int argc, char **argv) id = gethostid (); printf ("%lx\n", id); - if (fclose (stdout) == EOF) - error (EXIT_FAILURE, errno, _("write error")); + close_stdout (); exit (EXIT_SUCCESS); } |