X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=gnu%2Fclose-stream.c;h=7ace2b2cd42cbfe8691e41c5a0979f09d3346e79;hb=4aa85f09e755fc827cd5ab6225f20c83cd42245d;hp=306d9015983232a0f4ee8853e54fd57493fa8885;hpb=22f1eb8bc17e5be72dd23d42d6aaa60196ac22e6;p=debian%2Ftar diff --git a/gnu/close-stream.c b/gnu/close-stream.c index 306d9015..7ace2b2c 100644 --- a/gnu/close-stream.c +++ b/gnu/close-stream.c @@ -2,7 +2,7 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Close a stream, with nicer error checking than fclose's. - Copyright (C) 1998-2002, 2004, 2006-2010 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2004, 2006-2014 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 @@ -57,15 +57,15 @@ int close_stream (FILE *stream) { - bool some_pending = (__fpending (stream) != 0); - bool prev_fail = (ferror (stream) != 0); - bool fclose_fail = (fclose (stream) != 0); + const bool some_pending = (__fpending (stream) != 0); + const bool prev_fail = (ferror (stream) != 0); + const bool fclose_fail = (fclose (stream) != 0); /* Return an error indication if there was a previous failure or if fclose failed, with one exception: ignore an fclose failure if there was no previous error, no data remains to be flushed, and fclose failed with EBADF. That can happen when a program like cp - is invoked like this `cp a b >&-' (i.e., with standard output + is invoked like this 'cp a b >&-' (i.e., with standard output closed) and doesn't generate any output (hence no previous error and nothing to be flushed). */