Commit 42193f8914e8a2f3e4821520279bd3dd1fcb3178

Francois Perrad 2019-04-09T20:26:08

explicit operator precedence

diff --git a/bn_mp_mul.c b/bn_mp_mul.c
index 585f93c..ff85110 100644
--- a/bn_mp_mul.c
+++ b/bn_mp_mul.c
@@ -27,7 +27,7 @@ int mp_mul(const mp_int *a, const mp_int *b, mp_int *c)
     * was actually slower on the author's machine, but YMMV.
     */
    if ((MIN(len_a, len_b) < KARATSUBA_MUL_CUTOFF)
-       || ((MAX(len_a, len_b)) / 2 < KARATSUBA_MUL_CUTOFF)) {
+       || ((MAX(len_a, len_b) / 2) < KARATSUBA_MUL_CUTOFF)) {
       goto GO_ON;
    }
    /*
diff --git a/tommath_private.h b/tommath_private.h
index aeea591..4d6e587 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -80,7 +80,7 @@ int func_name (mp_int * a, type b)                       \
      while (b != 0u) {                                   \
         a->dp[x++] = ((mp_digit)b & MP_MASK);            \
         if ((CHAR_BIT * sizeof (b)) <= DIGIT_BIT) { break; } \
-        b >>= ((CHAR_BIT * sizeof (b)) <= DIGIT_BIT ? 0 : DIGIT_BIT); \
+        b >>= (((CHAR_BIT * sizeof (b)) <= DIGIT_BIT) ? 0 : DIGIT_BIT); \
      }                                                   \
      a->used = x;                                        \
    }                                                     \