[Tarantool-patches] [PATCH v8 02/12] core/say: use say_logger_initialized in say_logger_free

Cyrill Gorcunov gorcunov at gmail.com
Wed Jun 3 01:18:07 MSK 2020


To eliminate opencoded comparision.

Reviewed-by: Leonid Vasiliev <lvasiliev at tarantool.org>
Reviewed-by: Oleg Babin <olegrok at tarantool.org>
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
 src/lib/core/say.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/core/say.c b/src/lib/core/say.c
index d8f59fb9b..791011e6f 100644
--- a/src/lib/core/say.c
+++ b/src/lib/core/say.c
@@ -749,7 +749,7 @@ say_logger_init(const char *init_str, int level, int nonblock,
 void
 say_logger_free()
 {
-	if (log_default == &log_std)
+	if (say_logger_initialized())
 		log_destroy(&log_std);
 }
 
-- 
2.26.2



More information about the Tarantool-patches mailing list