all computation on unsigned
This commit is contained in:
parent
d2b739ee18
commit
62a09c66ca
@ -6,8 +6,7 @@
|
||||
/* get the size for an unsigned equivalent */
|
||||
size_t mp_ubin_size(const mp_int *a)
|
||||
{
|
||||
int size = mp_count_bits(a);
|
||||
size = (size / 8) + ((((unsigned)size & 7u) != 0u) ? 1 : 0);
|
||||
return (size_t)size;
|
||||
size_t size = (size_t)mp_count_bits(a);
|
||||
return (size / 8u) + (((size & 7u) != 0u) ? 1u : 0u);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user