Avoid initializing stdout twice

Closes #190
This commit is contained in:
Nicolas Viennot 2020-03-11 11:30:33 -04:00
parent ba6ac3a363
commit 9e3e39d66d

3
log.c
View File

@ -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);