diff options
Diffstat (limited to 'libtommath/bn_mp_mul_d.c')
-rw-r--r-- | libtommath/bn_mp_mul_d.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libtommath/bn_mp_mul_d.c b/libtommath/bn_mp_mul_d.c index 98b99c9..0f6d03e 100644 --- a/libtommath/bn_mp_mul_d.c +++ b/libtommath/bn_mp_mul_d.c @@ -16,8 +16,7 @@ */ /* multiply by a digit */ -int -mp_mul_d(const mp_int *a, mp_digit b, mp_int *c) +int mp_mul_d(const mp_int *a, mp_digit b, mp_int *c) { mp_digit u, *tmpa, *tmpc; mp_word r; @@ -51,10 +50,10 @@ mp_mul_d(const mp_int *a, mp_digit b, mp_int *c) r = (mp_word)u + ((mp_word)*tmpa++ * (mp_word)b); /* mask off higher bits to get a single digit */ - *tmpc++ = (mp_digit)(r & ((mp_word) MP_MASK)); + *tmpc++ = (mp_digit)(r & ((mp_word)MP_MASK)); /* send carry into next iteration */ - u = (mp_digit)(r >> ((mp_word) DIGIT_BIT)); + u = (mp_digit)(r >> ((mp_word)DIGIT_BIT)); } /* store final carry [if any] and increment ix offset */ |