Skip to content

Commit

Permalink
Fix warning: pointer 'io' may be used after 'fclose'
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Pankratz <[email protected]>
  • Loading branch information
kratz00 authored and icculus committed Jun 27, 2023
1 parent 3079c09 commit 6d9161e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions misc/make_self_extracting.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ static off_t get_file_size(const char *fname)
else if ((retval = ftello(io)) == -1)
FAIL("ftello");
else if (fclose(io) == EOF)
{
io = NULL;
FAIL("fclose");
} // else if
#undef FAIL

return retval;
Expand Down

0 comments on commit 6d9161e

Please sign in to comment.