fix ambiguous call to abs() in tommath (#1228)

fix ambiguous call to abs() in tommath
This commit is contained in:
Arvid Norberg 2016-10-20 00:13:45 -04:00 committed by GitHub
parent 037f349cee
commit 7009001f73
1 changed files with 2 additions and 2 deletions

View File

@ -6708,7 +6708,7 @@ mp_rand (mp_int * a, int digits)
/* first place a random non-zero digit */
do {
d = ((mp_digit) abs (MP_GEN_RANDOM())) & MP_MASK;
d = ((mp_digit) abs (int(MP_GEN_RANDOM()))) & MP_MASK;
} while (d == 0);
if ((res = mp_add_d (a, d, a)) != MP_OKAY) {
@ -6720,7 +6720,7 @@ mp_rand (mp_int * a, int digits)
return res;
}
if ((res = mp_add_d (a, ((mp_digit) abs (MP_GEN_RANDOM())), a)) != MP_OKAY) {
if ((res = mp_add_d (a, ((mp_digit) abs (int(MP_GEN_RANDOM()))), a)) != MP_OKAY) {
return res;
}
}