X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-freopen.c;h=a98530c950edcd2bc4fa7275cc1890f5d91b7d37;hb=1276a2c5f24c0c932426aca9c899fa524d2443f2;hp=747d315f92648f4317e37ec3fcd0e90057333acd;hpb=1602f0afed21be664fcf5c42d59db07cc22c56d6;p=gnulib.git diff --git a/tests/test-freopen.c b/tests/test-freopen.c index 747d315f9..a98530c95 100644 --- a/tests/test-freopen.c +++ b/tests/test-freopen.c @@ -1,5 +1,5 @@ /* Test of opening a file stream. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -62,7 +62,9 @@ main () } } { - FILE *fp = fdopen (99, "w+"); + FILE *fp; + close (99); + fp = fdopen (99, "w+"); if (fp != NULL) { errno = 0;