diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-05 14:23:21 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-05 14:23:21 (GMT) |
commit | 508e022fa975ee61d6aef292a45eabccc2e3d662 (patch) | |
tree | 12ef2aef9ac316f393476275b8915d0ecea07b8d /libtommath/bn_mp_reduce.c | |
parent | 505f963287b050bd46871d4659cebc65986ca5ac (diff) | |
download | tcl-508e022fa975ee61d6aef292a45eabccc2e3d662.zip tcl-508e022fa975ee61d6aef292a45eabccc2e3d662.tar.gz tcl-508e022fa975ee61d6aef292a45eabccc2e3d662.tar.bz2 |
Update to latest "develop" branch of libtommath
Diffstat (limited to 'libtommath/bn_mp_reduce.c')
-rw-r--r-- | libtommath/bn_mp_reduce.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libtommath/bn_mp_reduce.c b/libtommath/bn_mp_reduce.c index d5d3fb1..5748550 100644 --- a/libtommath/bn_mp_reduce.c +++ b/libtommath/bn_mp_reduce.c @@ -64,10 +64,12 @@ mp_err mp_reduce(mp_int *x, const mp_int *m, const mp_int *mu) /* If x < 0, add b**(k+1) to it */ if (mp_cmp_d(x, 0uL) == MP_LT) { mp_set(&q, 1uL); - if ((err = mp_lshd(&q, um + 1)) != MP_OKAY) + if ((err = mp_lshd(&q, um + 1)) != MP_OKAY) { goto CLEANUP; - if ((err = mp_add(x, &q, x)) != MP_OKAY) + } + if ((err = mp_add(x, &q, x)) != MP_OKAY) { goto CLEANUP; + } } /* Back off if it's too big */ |