From 70ec0ae1dff2a0f98054f8730680b7580e2b80bd Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 17 Jun 2000 12:21:39 +0000 Subject: [PATCH] Add braces to shut compiler up. Reformat code slightly. --- fipstest.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/fipstest.c b/fipstest.c index cdfcc05..9febfd4 100644 --- a/fipstest.c +++ b/fipstest.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: fipstest.c,v 1.1 2000/06/17 10:55:38 mdw Exp $ + * $Id: fipstest.c,v 1.2 2000/06/17 12:21:39 mdw Exp $ * * FIPS 140-1 randomness tests * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: fipstest.c,v $ + * Revision 1.2 2000/06/17 12:21:39 mdw + * Add braces to shut compiler up. Reformat code slightly. + * * Revision 1.1 2000/06/17 10:55:38 mdw * FIPS 140-1 random generator test. * @@ -133,7 +136,7 @@ static unsigned runs(const octet *p) unsigned i, j; unsigned r = 0; unsigned bb = 0; - unsigned f[2][6] = { 0 }; + unsigned f[2][6] = { { 0 } }; /* --- Count the run lengths --- */ @@ -166,18 +169,12 @@ static unsigned runs(const octet *p) /* --- Check the results --- */ - if (2267 > f[0][0] || f[0][0] > 2733 || - 2267 > f[1][0] || f[1][0] > 2733 || - 1079 > f[0][1] || f[0][1] > 1421 || - 1079 > f[1][1] || f[1][1] > 1421 || - 502 > f[0][2] || f[0][2] > 748 || - 502 > f[1][2] || f[1][2] > 748 || - 223 > f[0][3] || f[0][3] > 402 || - 223 > f[1][3] || f[1][3] > 402 || - 90 > f[0][4] || f[0][4] > 223 || - 90 > f[1][4] || f[1][4] > 223 || - 90 > f[0][5] || f[0][5] > 223 || - 90 > f[1][5] || f[1][5] > 223) + if (2267 > f[0][0] || f[0][0] > 2733 || 2267 > f[1][0] || f[1][0] > 2733 || + 1079 > f[0][1] || f[0][1] > 1421 || 1079 > f[1][1] || f[1][1] > 1421 || + 502 > f[0][2] || f[0][2] > 748 || 502 > f[1][2] || f[1][2] > 748 || + 223 > f[0][3] || f[0][3] > 402 || 223 > f[1][3] || f[1][3] > 402 || + 90 > f[0][4] || f[0][4] > 223 || 90 > f[1][4] || f[1][4] > 223 || + 90 > f[0][5] || f[0][5] > 223 || 90 > f[1][5] || f[1][5] > 223) rc |= FIPSTEST_RUNS; return (rc); -- 2.11.0