explicit block
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/bn_mp_div.c b/bn_mp_div.c
index 336a57b..f50a8d7 100644
--- a/bn_mp_div.c
+++ b/bn_mp_div.c
@@ -196,8 +196,9 @@ int mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d)
tmp = ((mp_word) x.dp[i]) << ((mp_word) DIGIT_BIT);
tmp |= ((mp_word) x.dp[i - 1]);
tmp /= ((mp_word) y.dp[t]);
- if (tmp > (mp_word) MP_MASK)
+ if (tmp > (mp_word) MP_MASK) {
tmp = MP_MASK;
+ }
q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK));
}
diff --git a/bn_mp_mul.c b/bn_mp_mul.c
index 74b5135..d7f0074 100644
--- a/bn_mp_mul.c
+++ b/bn_mp_mul.c
@@ -49,12 +49,13 @@ int mp_mul (mp_int * a, mp_int * b, mp_int * c)
res = fast_s_mp_mul_digs (a, b, c, digs);
} else
#endif
+ {
#ifdef BN_S_MP_MUL_DIGS_C
res = s_mp_mul (a, b, c); /* uses s_mp_mul_digs */
#else
res = MP_VAL;
#endif
-
+ }
}
c->sign = (c->used > 0) ? neg : MP_ZPOS;
return res;
diff --git a/bn_mp_shrink.c b/bn_mp_shrink.c
index 0eaa09e..bbc1208 100644
--- a/bn_mp_shrink.c
+++ b/bn_mp_shrink.c
@@ -21,8 +21,9 @@ int mp_shrink (mp_int * a)
mp_digit *tmp;
int used = 1;
- if(a->used > 0)
+ if(a->used > 0) {
used = a->used;
+ }
if (a->alloc != used) {
if ((tmp = OPT_CAST(mp_digit) XREALLOC (a->dp, sizeof (mp_digit) * used)) == NULL) {
diff --git a/bn_mp_sqr.c b/bn_mp_sqr.c
index fa5a8a6..5167ce0 100644
--- a/bn_mp_sqr.c
+++ b/bn_mp_sqr.c
@@ -42,11 +42,13 @@ mp_sqr (mp_int * a, mp_int * b)
res = fast_s_mp_sqr (a, b);
} else
#endif
+ {
#ifdef BN_S_MP_SQR_C
res = s_mp_sqr (a, b);
#else
res = MP_VAL;
#endif
+ }
}
b->sign = MP_ZPOS;
return res;