You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
462 B

  1. From 9e3e39d66ddb4a610720fa37a5683c846d2a1ba6 Mon Sep 17 00:00:00 2001
  2. From: Nicolas Viennot <nicolas@viennot.biz>
  3. Date: Wed, 11 Mar 2020 11:30:33 -0400
  4. Subject: [PATCH] Avoid initializing stdout twice
  5. Closes #190
  6. ---
  7. log.c | 3 +++
  8. 1 file changed, 3 insertions(+)
  9. --- a/log.c
  10. +++ b/log.c
  11. @@ -61,6 +61,9 @@ log_get_level(void)
  12. void
  13. log_open_fp(FILE *f)
  14. {
  15. + if (log_file == f)
  16. + return;
  17. +
  18. if (log_file != NULL && !is_log_stdout())
  19. fclose(log_file);