diff options
Diffstat (limited to 'test/entropy.c')
-rw-r--r-- | test/entropy.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/entropy.c b/test/entropy.c index fb066a6c5b..8fbdb9147f 100644 --- a/test/entropy.c +++ b/test/entropy.c @@ -1,4 +1,4 @@ -/* Copyright 2017 The Chromium OS Authors. All rights reserved. +/* Copyright 2017 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * @@ -26,10 +26,10 @@ uint32_t log2(int32_t val) int val1 = 31 - __builtin_clz(val); int val2 = 32 - __builtin_clz(val - 1); - return log2_mult * (val1 + val2)/2; + return log2_mult * (val1 + val2) / 2; } -void run_test(int argc, char **argv) +void run_test(int argc, const char **argv) { const int loopcount = 512; @@ -52,7 +52,7 @@ void run_test(int argc, char **argv) t1 = get_time(); if (i == 0) ccprintf("Got %zd bytes in %" PRId64 " us\n", - sizeof(buffer), t1.val - t0.val); + sizeof(buffer), t1.val - t0.val); for (j = 0; j < sizeof(buffer); j++) buckets[buffer[j]]++; @@ -82,7 +82,7 @@ void run_test(int argc, char **argv) ccprintf("\n"); ccprintf("Entropy: %u/1000 bits\n", - entropy * 1000 / (log2_mult * totalcount)); + entropy * 1000 / (log2_mult * totalcount)); /* We want at least 2 bits of entropy (out of a maximum of 8) */ if ((entropy / (log2_mult * totalcount)) >= 2) |