Mercurial > dropbear
diff bn_mp_reduce_is_2k.c @ 190:d8254fc979e9 libtommath-orig LTM_0.35
Initial import of libtommath 0.35
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 06 May 2005 08:59:30 +0000 |
parents | d29b64170cf0 |
children |
line wrap: on
line diff
--- a/bn_mp_reduce_is_2k.c Sun Dec 19 11:33:56 2004 +0000 +++ b/bn_mp_reduce_is_2k.c Fri May 06 08:59:30 2005 +0000 @@ -22,9 +22,9 @@ mp_digit iz; if (a->used == 0) { - return 0; + return MP_NO; } else if (a->used == 1) { - return 1; + return MP_YES; } else if (a->used > 1) { iy = mp_count_bits(a); iz = 1; @@ -33,7 +33,7 @@ /* Test every bit from the second digit up, must be 1 */ for (ix = DIGIT_BIT; ix < iy; ix++) { if ((a->dp[iw] & iz) == 0) { - return 0; + return MP_NO; } iz <<= 1; if (iz > (mp_digit)MP_MASK) { @@ -42,7 +42,7 @@ } } } - return 1; + return MP_YES; } #endif