From 0b1d7d946d43c4507325d0491cd44a0a971d97f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teppo=20J=C3=A4rvelin?= Date: Fri, 13 Dec 2019 07:39:39 +0200 Subject: [PATCH] Coverity fix: dead error condition removed from ecc.c --- tinycrypt/ecc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c index a0333b049..0447cbac1 100644 --- a/tinycrypt/ecc.c +++ b/tinycrypt/ecc.c @@ -1015,13 +1015,10 @@ static void EccPoint_mult(uECC_word_t * result, const uECC_word_t * point, static uECC_word_t regularize_k(const uECC_word_t * const k, uECC_word_t *k0, uECC_word_t *k1) { - - wordcount_t num_n_words = NUM_ECC_WORDS; bitcount_t num_n_bits = NUM_ECC_BITS; uECC_word_t carry = uECC_vli_add(k0, k, curve_n) || - (num_n_bits < ((bitcount_t)num_n_words * uECC_WORD_SIZE * 8) && - uECC_vli_testBit(k0, num_n_bits)); + uECC_vli_testBit(k0, num_n_bits); uECC_vli_add(k1, k0, curve_n);