aboutsummaryrefslogtreecommitdiff
path: root/src/test/util_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r--src/test/util_tests.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index e467a4171d..efd4498747 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -243,11 +243,7 @@ BOOST_AUTO_TEST_CASE(util_IsHex)
BOOST_AUTO_TEST_CASE(util_seed_insecure_rand)
{
- int i;
- int count=0;
-
seed_insecure_rand(true);
-
for (int mod=2;mod<11;mod++)
{
int mask = 1;
@@ -256,10 +252,9 @@ BOOST_AUTO_TEST_CASE(util_seed_insecure_rand)
//mask is 2^ceil(log2(mod))-1
while(mask<mod-1)mask=(mask<<1)+1;
- count = 0;
+ int count = 0;
//How often does it get a zero from the uniform range [0,mod)?
- for (i=0;i<10000;i++)
- {
+ for (int i = 0; i < 10000; i++) {
uint32_t rval;
do{
rval=insecure_rand()&mask;