Skip to content

Commit

Permalink
Avoid initializing stdout twice
Browse files Browse the repository at this point in the history
  • Loading branch information
nviennot committed Mar 11, 2020
1 parent ba6ac3a commit 9e3e39d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions log.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ log_get_level(void)
void
log_open_fp(FILE *f)
{
if (log_file == f)
return;

if (log_file != NULL && !is_log_stdout())
fclose(log_file);

Expand Down

0 comments on commit 9e3e39d

Please sign in to comment.