X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fputc.c;h=e05f641ed319087baa515bc123ae1bf4f5f09380;hb=bbfcd2f1a92c9bdbb8d7d7d0a8a8c6665c316747;hp=03a371627c7ab906cc77159985148617577af461;hpb=bd35a4e10e52b9fbe25b7280c3c4d9ef4b144c8a;p=gnulib.git diff --git a/tests/test-fputc.c b/tests/test-fputc.c index 03a371627..e05f641ed 100644 --- a/tests/test-fputc.c +++ b/tests/test-fputc.c @@ -1,5 +1,5 @@ /* Test of fputc() function. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2013 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 . */ #include @@ -71,7 +70,9 @@ main (int argc, char **argv) } } { - FILE *fp = fdopen (99, "w"); + FILE *fp; + close (99); + fp = fdopen (99, "w"); if (fp != NULL) { setvbuf (fp, NULL, _IONBF, 0);