X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fwrite.c;h=e51b2ab06b1d1a9e69b3b79b023955acdb276ec7;hb=1276a2c5f24c0c932426aca9c899fa524d2443f2;hp=1f3a66d1e667ef8839e2917cda20d7c377378d6c;hpb=341111f654709cd0295607a4abbe721495c77e90;p=gnulib.git diff --git a/tests/test-fwrite.c b/tests/test-fwrite.c index 1f3a66d1e..e51b2ab06 100644 --- a/tests/test-fwrite.c +++ b/tests/test-fwrite.c @@ -1,5 +1,5 @@ /* Test of fwrite() function. - Copyright (C) 2011-2012 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 @@ -72,7 +72,9 @@ main (int argc, char **argv) } } { - FILE *fp = fdopen (99, "w"); + FILE *fp; + close (99); + fp = fdopen (99, "w"); if (fp != NULL) { char buf[5] = "world";