comparison random.c @ 405:00703f1df67a

Remove extraneous tests in random mpint generation, courtesy of Klocwork
author Matt Johnston <matt@ucc.asn.au>
date Sat, 03 Feb 2007 13:23:18 +0000
parents 36d21680a9d3
children c216212001fc
comparison
equal deleted inserted replaced
404:a588558bfc94 405:00703f1df67a
232 232
233 bytes_to_mp(rand, randbuf, len); 233 bytes_to_mp(rand, randbuf, len);
234 234
235 /* keep regenerating until we get one satisfying 235 /* keep regenerating until we get one satisfying
236 * 0 < rand < max */ 236 * 0 < rand < max */
237 } while ( ( (max != NULL) && (mp_cmp(rand, max) != MP_LT) ) 237 } while (mp_cmp(rand, max) != MP_LT);
238 || (mp_cmp_d(rand, 0) != MP_GT) );
239 m_burn(randbuf, len); 238 m_burn(randbuf, len);
240 m_free(randbuf); 239 m_free(randbuf);
241 } 240 }