From: Hannah von Reth Date: Mon, 10 Aug 2020 14:22:56 +0000 (+0200) Subject: Remove the use of goto from test/csync/std_tests/check_std_c_jhash.c X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~59 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0c57bb8869379a48d3121d7fce46842710e99759;p=nextcloud-desktop.git Remove the use of goto from test/csync/std_tests/check_std_c_jhash.c --- diff --git a/test/csync/std_tests/check_std_c_jhash.c b/test/csync/std_tests/check_std_c_jhash.c index 88fc0734f..38b31c496 100644 --- a/test/csync/std_tests/check_std_c_jhash.c +++ b/test/csync/std_tests/check_std_c_jhash.c @@ -68,15 +68,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); - } } } @@ -210,16 +211,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; + } + } + } } } }