comparison libtommath/bn_mp_add_d.c @ 1470:8bba51a55704

Update to libtommath v1.0.1
author Matt Johnston <matt@ucc.asn.au>
date Thu, 08 Feb 2018 23:11:40 +0800
parents 60fc6476e044
children f52919ffd3b1
comparison
equal deleted inserted replaced
1469:51043e868f55 1470:8bba51a55704
47 } 47 }
48 48
49 /* old number of used digits in c */ 49 /* old number of used digits in c */
50 oldused = c->used; 50 oldused = c->used;
51 51
52 /* sign always positive */
53 c->sign = MP_ZPOS;
54
55 /* source alias */ 52 /* source alias */
56 tmpa = a->dp; 53 tmpa = a->dp;
57 54
58 /* destination alias */ 55 /* destination alias */
59 tmpc = c->dp; 56 tmpc = c->dp;
94 * can fall through correctly 91 * can fall through correctly
95 */ 92 */
96 ix = 1; 93 ix = 1;
97 } 94 }
98 95
96 /* sign always positive */
97 c->sign = MP_ZPOS;
98
99 /* now zero to oldused */ 99 /* now zero to oldused */
100 while (ix++ < oldused) { 100 while (ix++ < oldused) {
101 *tmpc++ = 0; 101 *tmpc++ = 0;
102 } 102 }
103 mp_clamp(c); 103 mp_clamp(c);
105 return MP_OKAY; 105 return MP_OKAY;
106 } 106 }
107 107
108 #endif 108 #endif
109 109
110 /* $Source$ */ 110 /* ref: $Format:%D$ */
111 /* $Revision$ */ 111 /* git commit: $Format:%H$ */
112 /* $Date$ */ 112 /* commit time: $Format:%ai$ */