From 42697bd45a226d0841189c5ee6d4987d6cd7f481 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 25 Nov 2019 15:21:05 +1100 Subject: Fix dead code in sslLogCallback relating to should_log variable. Coverity scans found that the should_log logic in sslLogCallback is not working as expected because the variable is not correctly initialised (the conditional code before logging always sets the value to 1, which it already is). --- ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssl.c b/ssl.c index 78ab9e4..b97fc1d 100644 --- a/ssl.c +++ b/ssl.c @@ -82,8 +82,8 @@ redisContextFuncs redisContextSSLFuncs; * Callback used for debugging */ static void sslLogCallback(const SSL *ssl, int where, int ret) { - const char *retstr = ""; - int should_log = 1; + const char *retstr; + int should_log = 0; /* Ignore low-level SSL stuff */ if (where & SSL_CB_ALERT) { -- cgit v1.2.3