declare loop variable at top of function body

This commit is contained in:
Brett Nicholas
2023-07-20 16:22:48 -06:00
committed by David Garske
parent 9fa838881c
commit e823da99ae

View File

@ -388,9 +388,10 @@ int DoneHandShake = 0;
static int run_all_CAST(void)
{
int ret = 0;
int cast_idx = 0;
for (int i=0; i<FIPS_CAST_COUNT; i++) {
if ((ret = wc_RunCast_fips(i)) != 0) {
for (cast_idx=0; cast_idx<FIPS_CAST_COUNT; cast_idx++) {
if ((ret = wc_RunCast_fips(cast_idx)) != 0) {
#ifdef NO_ERROR_STRINGS
fprintf(stderr,
"ERROR: FIPS CAST failed with return code: %d\n", ret);