From 93c6e99aef6f637cdde6c586b5666e05156bd9a9 Mon Sep 17 00:00:00 2001 From: Ethan Looney Date: Fri, 17 Jul 2020 08:45:39 -0700 Subject: [PATCH] Added a ret check --- tests/api.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/api.c b/tests/api.c index be693ac54..65cb4166a 100644 --- a/tests/api.c +++ b/tests/api.c @@ -22784,12 +22784,13 @@ static int test_wc_HashSetFlags(void) } } } - } - ret = wc_HashFree(&hash, notSupported[j]); - if (ret == BAD_FUNC_ARG) { - ret = 0; } - + if (ret == 0) { + ret = wc_HashFree(&hash, notSupported[j]); + if (ret == BAD_FUNC_ARG) { + ret = 0; + } + } } printf(resultFmt, ret == 0 ? passed : failed); @@ -22880,12 +22881,13 @@ static int test_wc_HashGetFlags(void) } } } - } - ret = wc_HashFree(&hash, notSupported[j]); - if (ret == BAD_FUNC_ARG) { - ret = 0; } - + if (ret == 0) { + ret = wc_HashFree(&hash, notSupported[j]); + if (ret == BAD_FUNC_ARG) { + ret = 0; + } + } } printf(resultFmt, ret == 0 ? passed : failed);