explicit operator precedence
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/mp_div.c b/mp_div.c
index 5fd9572..e9f4f50 100644
--- a/mp_div.c
+++ b/mp_div.c
@@ -27,7 +27,7 @@ mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *c, mp_int *d)
if (MP_HAS(S_MP_DIV_RECURSIVE)
&& (b->used > MP_KARATSUBA_MUL_CUTOFF)
- && (b->used <= ((a->used)/3*2))) {
+ && (b->used <= ((a->used/3)*2))) {
err = s_mp_div_recursive(a, b, c, d);
} else if (MP_HAS(S_MP_DIV_SCHOOL)) {
err = s_mp_div_school(a, b, c, d);
diff --git a/mp_log_u32.c b/mp_log_u32.c
index 5568568..cff9e48 100644
--- a/mp_log_u32.c
+++ b/mp_log_u32.c
@@ -17,7 +17,7 @@ mp_err mp_log_u32(const mp_int *a, uint32_t base, uint32_t *c)
return MP_VAL;
}
- if (MP_HAS(S_MP_LOG_POW2) && (base & (base - 1u)) == 0u) {
+ if (MP_HAS(S_MP_LOG_POW2) && ((base & (base - 1u)) == 0u)) {
*c = s_mp_log_pow2(a, base);
return MP_OKAY;
}
diff --git a/tommath_private.h b/tommath_private.h
index f3aeb8f..1911747 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -167,7 +167,7 @@ typedef unsigned long mp_word __attribute__((mode(TI)));
typedef uint64_t mp_word;
#endif
-MP_STATIC_ASSERT(correct_word_size, sizeof(mp_word) == 2 * sizeof(mp_digit))
+MP_STATIC_ASSERT(correct_word_size, sizeof(mp_word) == (2 * sizeof(mp_digit)))
/* default precision */
#ifndef MP_PREC