From 9370bb742d976166a51032760da1ecedefb92267 Mon Sep 17 00:00:00 2001 From: Pavel Punsky Date: Fri, 16 Sep 2022 23:29:32 -0700 Subject: [PATCH] Fix a warning (#988) There are too many defines that are, eventually, used in one place so just inlining. Current code generates following warning: ``` warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] ``` With the fix there is no warning Co-authored-by: Pavel Punsky --- src/apps/relay/netengine.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/apps/relay/netengine.c b/src/apps/relay/netengine.c index bd95625..634fd29 100644 --- a/src/apps/relay/netengine.c +++ b/src/apps/relay/netengine.c @@ -31,13 +31,7 @@ #include "mainrelay.h" //////////// Backward compatibility with OpenSSL 1.0.x ////////////// -#define HAVE_OPENSSL11_API (!(OPENSSL_VERSION_NUMBER < 0x10100001L || defined LIBRESSL_VERSION_NUMBER)) - -#ifndef HAVE_SSL_CTX_UP_REF -#define HAVE_SSL_CTX_UP_REF HAVE_OPENSSL11_API -#endif - -#if !HAVE_SSL_CTX_UP_REF +#if (OPENSSL_VERSION_NUMBER < 0x10100001L || defined LIBRESSL_VERSION_NUMBER) #define SSL_CTX_up_ref(ctx) CRYPTO_add(&(ctx)->references, 1, CRYPTO_LOCK_SSL_CTX) #endif