# HG changeset patch # User Matt Johnston # Date 1170508998 0 # Node ID 00703f1df67aa8327af9ae1926f4e699dbf3aaf1 # Parent a588558bfc948d6173ca29c960f8fda49c00dff3 Remove extraneous tests in random mpint generation, courtesy of Klocwork diff -r a588558bfc94 -r 00703f1df67a random.c --- a/random.c Sat Feb 03 09:58:14 2007 +0000 +++ b/random.c Sat Feb 03 13:23:18 2007 +0000 @@ -234,8 +234,7 @@ /* keep regenerating until we get one satisfying * 0 < rand < max */ - } while ( ( (max != NULL) && (mp_cmp(rand, max) != MP_LT) ) - || (mp_cmp_d(rand, 0) != MP_GT) ); + } while (mp_cmp(rand, max) != MP_LT); m_burn(randbuf, len); m_free(randbuf); }