Simpify mask formula.

This commit is contained in:
Giovanni Bajo 2011-09-27 09:38:47 +02:00
parent faf0f96de1
commit 4c776ac66d

View File

@ -37,7 +37,7 @@ int fp_prime_random_ex(fp_int *a, int size, int flags, tfm_prime_callback cb, vo
bsize = (size + 7) >> 3;
/* calc the maskAND value for the MSbyte */
maskAND_msb = FP_MASK >> ((DIGIT_BIT - (size & (DIGIT_BIT-1))) & (DIGIT_BIT-1));
maskAND_msb = FP_MASK >> ((DIGIT_BIT - size) & (DIGIT_BIT-1));
/* get the maskOR_lsb */
maskOR_lsb = 1;