X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fclose.c;h=cebfcebb81cd4f8daa7215548a3330e38942563a;hb=0c6fd3b84775ca4cf1045d4cc07a2dff4c73f29b;hp=ecc60cd4f0f3f44510702dcdee9c82c1e552eb6b;hpb=2408f02086a20c0a02241cd4a1cf11f126a95fe3;p=gnulib.git diff --git a/tests/test-fclose.c b/tests/test-fclose.c index ecc60cd4f..cebfcebb8 100644 --- a/tests/test-fclose.c +++ b/tests/test-fclose.c @@ -1,5 +1,5 @@ /* Test of fclose module. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-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 @@ -12,8 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Written by Eric Blake. */ @@ -97,7 +96,9 @@ main (int argc, char **argv) } } { - FILE *fp = fdopen (99, "r"); + FILE *fp; + close (99); + fp = fdopen (99, "r"); if (fp != NULL) { errno = 0;