format with astyle (step 3)
This commit is contained in:
parent
9eed07f09b
commit
4439fae168
@ -21,7 +21,7 @@ int mp_init(mp_int *a)
|
||||
int i;
|
||||
|
||||
/* allocate memory required and clear it */
|
||||
a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof (mp_digit) * MP_PREC);
|
||||
a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof(mp_digit) * MP_PREC);
|
||||
if (a->dp == NULL) {
|
||||
return MP_MEM;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ int mp_init_multi(mp_int *mp, ...)
|
||||
{
|
||||
mp_err res = MP_OKAY; /* Assume ok until proven otherwise */
|
||||
int n = 0; /* Number of ok inits */
|
||||
mp_int* cur_arg = mp;
|
||||
mp_int *cur_arg = mp;
|
||||
va_list args;
|
||||
|
||||
va_start(args, mp); /* init args to next argument from caller */
|
||||
@ -36,14 +36,14 @@ int mp_init_multi(mp_int *mp, ...)
|
||||
va_start(clean_args, mp);
|
||||
while (n-- != 0) {
|
||||
mp_clear(cur_arg);
|
||||
cur_arg = va_arg(clean_args, mp_int*);
|
||||
cur_arg = va_arg(clean_args, mp_int *);
|
||||
}
|
||||
va_end(clean_args);
|
||||
res = MP_MEM;
|
||||
break;
|
||||
}
|
||||
n++;
|
||||
cur_arg = va_arg(args, mp_int*);
|
||||
cur_arg = va_arg(args, mp_int *);
|
||||
}
|
||||
va_end(args);
|
||||
return res; /* Assumed ok, if error flagged above. */
|
||||
|
@ -24,7 +24,7 @@ int mp_init_size(mp_int *a, int size)
|
||||
size += (MP_PREC * 2) - (size % MP_PREC);
|
||||
|
||||
/* alloc mem */
|
||||
a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof (mp_digit) * size);
|
||||
a->dp = OPT_CAST(mp_digit) XMALLOC(sizeof(mp_digit) * size);
|
||||
if (a->dp == NULL) {
|
||||
return MP_MEM;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ int mp_mod_2d(mp_int *a, int b, mp_int *c)
|
||||
}
|
||||
|
||||
/* if the modulus is larger than the value than return */
|
||||
if (b >= (int) (a->used * DIGIT_BIT)) {
|
||||
if (b >= (int)(a->used * DIGIT_BIT)) {
|
||||
res = mp_copy(a, c);
|
||||
return res;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ int mp_montgomery_setup(mp_int *n, mp_digit *rho)
|
||||
{
|
||||
mp_digit x, b;
|
||||
|
||||
/* fast inversion mod 2**k
|
||||
/* fast inversion mod 2**k
|
||||
*
|
||||
* Based on the fact that
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user