diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-08-10 17:22:56 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2020-09-15 17:01:36 +0300 |
commit | a8ecf68b7bfdd27301fb9ed289118721b8888693 (patch) | |
tree | d6a42d70d4e868f20fb82cf0ee1e2dee1ca97b48 /test | |
parent | 7aca2a321812524e6932ce9e2c805183a82805c5 (diff) |
Remove the use of goto from test/csync/std_tests/check_std_c_jhash.c
Diffstat (limited to 'test')
-rw-r--r-- | test/csync/std_tests/check_std_c_jhash.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/test/csync/std_tests/check_std_c_jhash.c b/test/csync/std_tests/check_std_c_jhash.c index de7d8e7d5..67103372a 100644 --- a/test/csync/std_tests/check_std_c_jhash.c +++ b/test/csync/std_tests/check_std_c_jhash.c @@ -61,15 +61,16 @@ static void check_c_jhash_trials(void **state) e[0], f[0], g[0], h[0], x[0], y[0]); print_error("i %d j %d m %d len %d\n",i,j,m,hlen); } - if (z==MAXPAIR) goto done; + if (z == MAXPAIR) { + if (z < MAXPAIR) { + assert_true(z < MAXPAIR); + // print_error("%u trials needed, should be less than 40\n", z/2); + return; + } + } } } } - done: - if (z < MAXPAIR) { - assert_true(z < MAXPAIR); - // print_error("%u trials needed, should be less than 40\n", z/2); - } } } @@ -184,16 +185,17 @@ static void check_c_jhash64_trials(void **state) (uint32_t)i,(uint32_t)j,(uint32_t)m,(uint32_t)hlen); #endif } - if (z==MAXPAIR) goto done; - } - } - } - done: - if (z < MAXPAIR) { + if (z == MAXPAIR) { + if (z < MAXPAIR) { #if 0 - print_error("%lu trials needed, should be less than 40", z/2); + print_error("%lu trials needed, should be less than 40", z/2); #endif - assert_true(z < MAXPAIR); + assert_true(z < MAXPAIR); + } + return; + } + } + } } } } |