changeset 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 a588558bfc94
children 2448ae3e75b5
files random.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
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);
 }