Skip to content

Commit

Permalink
Fix reopen of stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
colinleroy committed Jan 30, 2024
1 parent b443206 commit 187d93b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/ref/test_gets.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ char *argv[];
#endif
{
/* Fake stdin with the reference file */
fclose(stdin);
stdin = fopen(INFILE, "rb");
if (stdin == NULL) {
if (freopen(INFILE, "rb", stdin) == NULL) {
return EXIT_FAILURE;
}

Expand Down

0 comments on commit 187d93b

Please sign in to comment.