From d09b7153f28cd0acf842f31fb2900263d31e6dbd Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 17 Jun 2021 09:43:06 +0700 Subject: [PATCH] address review items --- wolfcrypt/src/port/caam/caam_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/port/caam/caam_driver.c b/wolfcrypt/src/port/caam/caam_driver.c index e28d676fa..135958536 100644 --- a/wolfcrypt/src/port/caam/caam_driver.c +++ b/wolfcrypt/src/port/caam/caam_driver.c @@ -437,7 +437,7 @@ static void print_jdkek() /* instantiate RNG and create JDKEK, TDKEK, and TDSK key */ #define WC_RNG_START_SIZE 6 -static unsigned int wc_rng_start[] = { +static unsigned int wc_rng_start[WC_RNG_START_SIZE] = { CAAM_HEAD | 0x00000006, CAAM_OP | CAAM_CLASS1 | CAAM_RNG | 0x00000004, /* Instantiate RNG handle 0 with TRNG */ @@ -460,7 +460,7 @@ int caamInitRng(struct CAAM_DEVICE* dev) /* set up the job description for RNG initialization */ memset(&desc, 0, sizeof(DESCSTRUCT)); desc.desc[desc.idx++] = CAAM_HEAD; /* later will put size to header*/ - for (i = 1; i < WC_RNG_START_SIZE; i = i + 1) { + for (i = 1; i < WC_RNG_START_SIZE; i++) { desc.desc[desc.idx++] = wc_rng_start[i]; } desc.caam = dev;