From 851dc7125671a0ccf15ff619d9acf59880305510 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Thu, 21 Dec 2017 16:29:24 +0100 Subject: [5449] Spit has_feature #if --- src/lib/cryptolink/openssl_common.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/cryptolink/openssl_common.h b/src/lib/cryptolink/openssl_common.h index 6011f7e6c8..7e47e698f5 100644 --- a/src/lib/cryptolink/openssl_common.h +++ b/src/lib/cryptolink/openssl_common.h @@ -37,9 +37,11 @@ public: SecBuf(const std::vector& x) : vec_(x) {} ~SecBuf() { -#if defined(__has_feature) && __has_feature(address_sanitizer) +#if defined(__has_feature) +#if __has_feature(address_sanitizer) // Make the address sanitizer happy assuming this won't reallocate vec_.resize(vec_.capacity()); +#endif #endif std::memset(&vec_[0], 0, vec_.capacity() * sizeof(T)); }; @@ -69,9 +71,11 @@ public: }; void clear() { -#if defined(__has_feature) && __has_feature(address_sanitizer) +#if defined(__has_feature) +#if __has_feature(address_sanitizer) // Make the address sanitizer happy assuming this won't reallocate vec_.resize(vec_.capacity()); +#endif #endif std::memset(&vec_[0], 0, vec_.capacity() * sizeof(T)); vec_.clear(); -- cgit v1.2.3