diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-03-01 20:43:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-03-01 20:43:31 (GMT) |
commit | 5753c7a42b638962406f9f7f822e48561e7a6253 (patch) | |
tree | 65742203dd83d002e9c923ddf96ddf45460e0d05 /libtommath/bn_mp_cnt_lsb.c | |
parent | 6881a1a27437cae50d56f12227e9cfe10c7a49f2 (diff) | |
download | tcl-5753c7a42b638962406f9f7f822e48561e7a6253.zip tcl-5753c7a42b638962406f9f7f822e48561e7a6253.tar.gz tcl-5753c7a42b638962406f9f7f822e48561e7a6253.tar.bz2 |
Lots of code cleanup, mainly [https://github.com/libtom/libtommath/pull/102|Pull request #102]
Diffstat (limited to 'libtommath/bn_mp_cnt_lsb.c')
-rw-r--r-- | libtommath/bn_mp_cnt_lsb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libtommath/bn_mp_cnt_lsb.c b/libtommath/bn_mp_cnt_lsb.c index 9a94d3d..219c369 100644 --- a/libtommath/bn_mp_cnt_lsb.c +++ b/libtommath/bn_mp_cnt_lsb.c @@ -31,17 +31,17 @@ int mp_cnt_lsb(const mp_int *a) } /* scan lower digits until non-zero */ - for (x = 0; (x < a->used) && (a->dp[x] == 0); x++) {} + for (x = 0; (x < a->used) && (a->dp[x] == 0u); x++) {} q = a->dp[x]; x *= DIGIT_BIT; /* now scan this digit until a 1 is found */ - if ((q & 1) == 0) { + if ((q & 1u) == 0u) { do { - qq = q & 15; + qq = q & 15u; x += lnz[qq]; q >>= 4; - } while (qq == 0); + } while (qq == 0u); } return x; } |