summaryrefslogtreecommitdiff
path: root/source/test/unittests/secure_random.test.c
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2022-12-29 07:51:16 +0100
committerMitya Selivanov <automainint@guattari.tech>2022-12-29 07:51:16 +0100
commit7e6b36bc2d332a3cb66b83116a393ac4728236d5 (patch)
tree4e7255b1237564f9682cb8e1b84a5bc0c0a4fbef /source/test/unittests/secure_random.test.c
parentf9df8ec356b1e18bf46c9a35bec78ed025107376 (diff)
downloadkit-7e6b36bc2d332a3cb66b83116a393ac4728236d5.zip
Improve C89/90 compat
Diffstat (limited to 'source/test/unittests/secure_random.test.c')
-rw-r--r--source/test/unittests/secure_random.test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/test/unittests/secure_random.test.c b/source/test/unittests/secure_random.test.c
index ec0a7b2..bde68a5 100644
--- a/source/test/unittests/secure_random.test.c
+++ b/source/test/unittests/secure_random.test.c
@@ -5,6 +5,8 @@
#include "../../kit_test/test.h"
TEST("secure random") {
+ int i, j;
+
int v[20];
memset(v, 0, sizeof v);
@@ -13,8 +15,8 @@ TEST("secure random") {
int repeats = 0;
- for (int i = 1; i < sizeof v / sizeof *v; i++)
- for (int j = 0; j < i; j++)
+ for (i = 1; i < sizeof v / sizeof *v; i++)
+ for (j = 0; j < i; j++)
if (v[i] == v[j])
repeats++;