Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/5105)
{
unsigned int i;
- for (i = 0; i < sizeof(*out) / sizeof(out->limb[0]); i++) {
+ for (i = 0; i < NLIMBS; i++) {
out->limb[i] = a->limb[i] - b->limb[i];
}
}
unsigned int i;
uint32_t co1 = ((1 << 28) - 1) * amt, co2 = co1 - amt;
- for (i = 0; i < sizeof(*a) / sizeof(a->limb[0]); i++)
+ for (i = 0; i < NLIMBS; i++)
a->limb[i] += (i == sizeof(*a) / sizeof(a->limb[0]) / 2) ? co2 : co1;
}