Remove extraneous tests in random mpint generation,

courtesy of Klocwork

--HG--
extra : convert_revision : 2b5e1d92fd1ce08361e69155a525fca481e79fe4
This commit is contained in:
Matt Johnston 2007-02-03 13:23:18 +00:00
parent 28f1026de8
commit d0533106a8

View File

@ -234,8 +234,7 @@ void gen_random_mpint(mp_int *max, mp_int *rand) {
/* keep regenerating until we get one satisfying /* keep regenerating until we get one satisfying
* 0 < rand < max */ * 0 < rand < max */
} while ( ( (max != NULL) && (mp_cmp(rand, max) != MP_LT) ) } while (mp_cmp(rand, max) != MP_LT);
|| (mp_cmp_d(rand, 0) != MP_GT) );
m_burn(randbuf, len); m_burn(randbuf, len);
m_free(randbuf); m_free(randbuf);
} }