diff options
Diffstat (limited to 'libtommath/bn_mp_init.c')
-rw-r--r-- | libtommath/bn_mp_init.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libtommath/bn_mp_init.c b/libtommath/bn_mp_init.c index ee374ae..0556aeb 100644 --- a/libtommath/bn_mp_init.c +++ b/libtommath/bn_mp_init.c @@ -16,28 +16,28 @@ */ /* init a new mp_int */ -int mp_init (mp_int * a) +int mp_init(mp_int *a) { - int i; + int i; - /* allocate memory required and clear it */ - a->dp = OPT_CAST(mp_digit) XMALLOC (sizeof (mp_digit) * MP_PREC); - if (a->dp == NULL) { - return MP_MEM; - } + /* allocate memory required and clear it */ + a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof(mp_digit) * MP_PREC); + if (a->dp == NULL) { + return MP_MEM; + } - /* set the digits to zero */ - for (i = 0; i < MP_PREC; i++) { + /* set the digits to zero */ + for (i = 0; i < MP_PREC; i++) { a->dp[i] = 0; - } + } - /* set the used to zero, allocated digits to the default precision - * and sign to positive */ - a->used = 0; - a->alloc = MP_PREC; - a->sign = MP_ZPOS; + /* set the used to zero, allocated digits to the default precision + * and sign to positive */ + a->used = 0; + a->alloc = MP_PREC; + a->sign = MP_ZPOS; - return MP_OKAY; + return MP_OKAY; } #endif |