Commit 015c231888bf5fb695440deeca4ec143a1c478ed

Francois Perrad 2018-12-28T08:51:46

refactor without macro USED

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/bn_mp_get_double.c b/bn_mp_get_double.c
index 3ed5a71..3286a6a 100644
--- a/bn_mp_get_double.c
+++ b/bn_mp_get_double.c
@@ -19,7 +19,7 @@ double mp_get_double(const mp_int *a)
    for (i = 0; i < DIGIT_BIT; ++i) {
       fac *= 2.0;
    }
-   for (i = USED(a); i --> 0;) {
+   for (i = a->used; i --> 0;) {
       d = (d * fac) + (double)DIGIT(a, i);
    }
    return (mp_isneg(a) != MP_NO) ? -d : d;