diff 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
line wrap: on
line diff
--- 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);
 }