diff options
Diffstat (limited to 'libtommath/bn_mp_sqr.c')
-rw-r--r-- | libtommath/bn_mp_sqr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libtommath/bn_mp_sqr.c b/libtommath/bn_mp_sqr.c index 2b71097..a98f16c 100644 --- a/libtommath/bn_mp_sqr.c +++ b/libtommath/bn_mp_sqr.c @@ -35,9 +35,9 @@ int mp_sqr(const mp_int *a, mp_int *b) { #ifdef BN_FAST_S_MP_SQR_C /* can we use the fast comba multiplier? */ - if ((((a->used * 2) + 1) < MP_WARRAY) && + if ((((a->used * 2) + 1) < (int)MP_WARRAY) && (a->used < - (1 << (((sizeof(mp_word) * CHAR_BIT) - (2 * DIGIT_BIT)) - 1)))) { + (int)(1u << (((sizeof(mp_word) * (size_t)CHAR_BIT) - (2u * (size_t)DIGIT_BIT)) - 1u)))) { res = fast_s_mp_sqr(a, b); } else #endif |