summaryrefslogtreecommitdiffstats
path: root/libtommath/bn_mp_reduce.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-05 14:23:21 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-05 14:23:21 (GMT)
commit508e022fa975ee61d6aef292a45eabccc2e3d662 (patch)
tree12ef2aef9ac316f393476275b8915d0ecea07b8d /libtommath/bn_mp_reduce.c
parent505f963287b050bd46871d4659cebc65986ca5ac (diff)
downloadtcl-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.c6
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 */