X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fcloseout.c;h=2137fd4a332ab39f0c9a8985279680ec98fb2ac5;hb=f33c2ee251ee9669508b29752db3cf4729d9487d;hp=fb7d2bb427d6fe61b622819b1840126ebc7a0bae;hpb=267a39bafd249d7eb9c37df06dc6defcf41cb343;p=gnulib.git diff --git a/lib/closeout.c b/lib/closeout.c index fb7d2bb42..2137fd4a3 100644 --- a/lib/closeout.c +++ b/lib/closeout.c @@ -1,7 +1,7 @@ /* closeout.c - close standard output - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Free Software - Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include #endif @@ -73,9 +73,9 @@ close_stdout_set_file_name (const char *file) void close_stdout (void) { - bool prev_fail = ferror (stdout); - bool none_pending = (0 == __fpending (stdout)); - bool fclose_fail = fclose (stdout); + bool none_pending = (__fpending (stdout) == 0); + bool prev_fail = (ferror (stdout) != 0); + bool fclose_fail = (fclose (stdout) != 0); if (prev_fail || fclose_fail) {