comparison libtommath/bn_mp_init_copy.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
21 int res; 21 int res;
22 22
23 if ((res = mp_init_size (a, b->used)) != MP_OKAY) { 23 if ((res = mp_init_size (a, b->used)) != MP_OKAY) {
24 return res; 24 return res;
25 } 25 }
26 return mp_copy (b, a); 26
27 if((res = mp_copy (b, a)) != MP_OKAY) {
28 mp_clear(a);
29 }
30
31 return res;
27 } 32 }
28 #endif 33 #endif
29 34
30 /* $Source$ */ 35 /* ref: $Format:%D$ */
31 /* $Revision$ */ 36 /* git commit: $Format:%H$ */
32 /* $Date$ */ 37 /* commit time: $Format:%ai$ */