From 9e3e39d66ddb4a610720fa37a5683c846d2a1ba6 Mon Sep 17 00:00:00 2001
|
|
From: Nicolas Viennot <nicolas@viennot.biz>
|
|
Date: Wed, 11 Mar 2020 11:30:33 -0400
|
|
Subject: [PATCH] Avoid initializing stdout twice
|
|
|
|
Closes #190
|
|
---
|
|
log.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
--- a/log.c
|
|
+++ b/log.c
|
|
@@ -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);
|
|
|