Mercurial > dropbear
diff bn_mp_lcm.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_lcm.c Sun Dec 19 11:33:56 2004 +0000 +++ b/bn_mp_lcm.c Fri May 06 08:59:30 2005 +0000 @@ -28,20 +28,20 @@ /* t1 = get the GCD of the two inputs */ if ((res = mp_gcd (a, b, &t1)) != MP_OKAY) { - goto __T; + goto LBL_T; } /* divide the smallest by the GCD */ if (mp_cmp_mag(a, b) == MP_LT) { /* store quotient in t2 such that t2 * b is the LCM */ if ((res = mp_div(a, &t1, &t2, NULL)) != MP_OKAY) { - goto __T; + goto LBL_T; } res = mp_mul(b, &t2, c); } else { /* store quotient in t2 such that t2 * a is the LCM */ if ((res = mp_div(b, &t1, &t2, NULL)) != MP_OKAY) { - goto __T; + goto LBL_T; } res = mp_mul(a, &t2, c); } @@ -49,7 +49,7 @@ /* fix the sign to positive */ c->sign = MP_ZPOS; -__T: +LBL_T: mp_clear_multi (&t1, &t2, NULL); return res; }