From 277206918e5839990b2467322b8c42a7a3a42e93 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> Date: Sun, 29 Mar 2020 18:28:10 +0900 Subject: [PATCH] Fix 'overlapping comparisons always evaluate to true' compile error with clang-10 --- crypto/gnutls/gnutls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/gnutls/gnutls.c b/crypto/gnutls/gnutls.c index 82c39b51..544f6c36 100644 --- a/crypto/gnutls/gnutls.c +++ b/crypto/gnutls/gnutls.c @@ -70,12 +70,12 @@ ngtcp2_crypto_ctx *ngtcp2_crypto_ctx_tls(ngtcp2_crypto_ctx *ctx, gnutls_cipher_algorithm_t hp_cipher; cipher = gnutls_cipher_get(session); - if (cipher != GNUTLS_CIPHER_UNKNOWN || cipher != GNUTLS_CIPHER_NULL) { + if (cipher != GNUTLS_CIPHER_UNKNOWN && cipher != GNUTLS_CIPHER_NULL) { ctx->aead.native_handle = (void *)cipher; } hash = gnutls_prf_hash_get(session); - if (hash != GNUTLS_DIG_UNKNOWN || hash != GNUTLS_DIG_NULL) { + if (hash != GNUTLS_DIG_UNKNOWN && hash != GNUTLS_DIG_NULL) { ctx->md.native_handle = (void *)hash; } -- GitLab