From: Francis Dupont Date: Thu, 21 Dec 2017 15:29:24 +0000 (+0100) Subject: [5449] Spit has_feature #if X-Git-Tag: trac5694_base~2^2~2^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=851dc7125671a0ccf15ff619d9acf59880305510;p=thirdparty%2Fkea.git [5449] Spit has_feature #if --- 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();