From a46c6a85fcdb67b9ffce907ba9ce6a2f65e728ad Mon Sep 17 00:00:00 2001 From: Zhi Guan Date: Sat, 25 May 2024 21:24:23 +0800 Subject: [PATCH] Update sdftest.c --- tools/sdftest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/sdftest.c b/tools/sdftest.c index 67c9ef33..f59297d9 100644 --- a/tools/sdftest.c +++ b/tools/sdftest.c @@ -109,7 +109,8 @@ static int test_SDF_GenerateRandom(void) { void *hDeviceHandle = NULL; void *hSessionHandle = NULL; - int ret; + int lengths[] = { 1, 8, 128 }; + int ret, i; ret = SDF_OpenDevice(&hDeviceHandle); if (ret != SDR_OK) { @@ -123,8 +124,7 @@ static int test_SDF_GenerateRandom(void) return -1; } - int lengths[] = { 1, 8, 128 }; - for (int i = 0; i < sizeof(lengths) / sizeof(lengths[0]); i++) { + for (i = 0; i < sizeof(lengths) / sizeof(lengths[0]); i++) { unsigned int uiLength = lengths[i]; unsigned char pucRandom[128] = {0}; // Assuming max length unsigned char zeros[sizeof(pucRandom)] = {0};