diff options
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -39,33 +39,33 @@ void m_mp_init(mp_int *mp) { * on error */ void m_mp_init_multi(mp_int *mp, ...) { - mp_int* cur_arg = mp; - va_list args; + mp_int* cur_arg = mp; + va_list args; - va_start(args, mp); /* init args to next argument from caller */ - while (cur_arg != NULL) { - if (mp_init(cur_arg) != MP_OKAY) { + va_start(args, mp); /* init args to next argument from caller */ + while (cur_arg != NULL) { + if (mp_init(cur_arg) != MP_OKAY) { dropbear_exit("Mem alloc error"); - } - cur_arg = va_arg(args, mp_int*); - } - va_end(args); + } + cur_arg = va_arg(args, mp_int*); + } + va_end(args); } void m_mp_alloc_init_multi(mp_int **mp, ...) { - mp_int** cur_arg = mp; - va_list args; + mp_int** cur_arg = mp; + va_list args; - va_start(args, mp); /* init args to next argument from caller */ - while (cur_arg != NULL) { - *cur_arg = m_malloc(sizeof(mp_int)); - if (mp_init(*cur_arg) != MP_OKAY) { + va_start(args, mp); /* init args to next argument from caller */ + while (cur_arg != NULL) { + *cur_arg = m_malloc(sizeof(mp_int)); + if (mp_init(*cur_arg) != MP_OKAY) { dropbear_exit("Mem alloc error"); - } - cur_arg = va_arg(args, mp_int**); - } - va_end(args); + } + cur_arg = va_arg(args, mp_int**); + } + va_end(args); } void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len) { |