From: James Jones Date: Fri, 29 Apr 2022 19:16:56 +0000 (-0500) Subject: Make minmax_heap_burn_in() exercise all operations (CID #1503996) (#4478) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a75ca90d65ecf022ef9e8de3d90e490551294d2;p=thirdparty%2Ffreeradius-server.git Make minmax_heap_burn_in() exercise all operations (CID #1503996) (#4478) random choice of operation wasn't hitting all cases --- diff --git a/src/lib/util/minmax_heap_tests.c b/src/lib/util/minmax_heap_tests.c index 9229a7bef4d..a0898a62585 100644 --- a/src/lib/util/minmax_heap_tests.c +++ b/src/lib/util/minmax_heap_tests.c @@ -250,7 +250,7 @@ static void minmax_heap_burn_in(void) TEST_CHECK((ret_insert = fr_minmax_heap_insert(hp, &array[insert_count])) >= 0); insert_count++; } else { - switch (rand() % 3) { + switch (rand() % 5) { case 0: /* insert */ goto insert;