int left;
int ret;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
hp = fr_heap_alloc(NULL, heap_cmp, heap_thing, heap, 0);
TEST_CHECK(hp != NULL);
unsigned int count = 0;
int ret;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
hp = fr_heap_alloc(NULL, heap_cmp, heap_thing, heap, 0);
TEST_CHECK(hp != NULL);
int ret;
fr_time_t start_insert, start_remove, start_swap, end;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
hp = fr_heap_alloc(NULL, heap_cmp, heap_thing, heap, 0);
TEST_CHECK(hp != NULL);
unsigned int left;
int ret;
- static bool done_init = false;
-
- if (!done_init) {
- srand((unsigned int)time(NULL));
- done_init = true;
- }
-
lst = fr_lst_alloc(NULL, lst_cmp, lst_thing, idx, 0);
TEST_CHECK(lst != NULL);
fr_heap_t *hp;
lst_thing *lst_array, *hp_array;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
int ret;
lst_thing *from_lst, *from_hp;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
lst = fr_lst_alloc(NULL, lst_cmp, lst_thing, idx, 0);
TEST_CHECK(lst != NULL);
fr_lst_t *lst = NULL;
lst_thing *array = NULL;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
int insert_count = 0;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
array = calloc(BURN_IN_OPS, sizeof(lst_thing));
for (unsigned int i = 0; i < BURN_IN_OPS; i++) array[i].data = fr_fast_rand(&rand_ctx) % 65537;
int ret;
fr_time_t start_insert, start_remove, start_swap, end;
- static bool done_init = false;
-
- if (!done_init) {
- srand((unsigned int)time(NULL));
- done_init = true;
- }
-
lst = fr_lst_alloc(NULL, lst_cmp, lst_thing, idx, 0);
TEST_CHECK(lst != NULL);
int left;
int ret;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
hp = fr_minmax_heap_alloc(NULL, minmax_heap_cmp, minmax_heap_thing, idx, 0);
TEST_CHECK(hp != NULL);
fr_minmax_heap_t *hp = NULL;
minmax_heap_thing *array = NULL;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
int insert_count = 0;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
array = calloc(BURN_IN_OPS, sizeof(minmax_heap_thing));
for (unsigned int i = 0; i < BURN_IN_OPS; i++) array[i].data = fr_fast_rand(&rand_ctx) % 65537;
unsigned int count;
int ret;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
hp = fr_minmax_heap_alloc(NULL, minmax_heap_cmp, minmax_heap_thing, idx, 0);
TEST_CHECK(hp != NULL);
int ret;
fr_time_t start_insert, start_remove, start_swap, end;
fr_fast_rand_t rand_ctx;
- static bool done_init = false;
- if (!done_init) {
- rand_ctx.a = fr_rand();
- rand_ctx.b = fr_rand();
- done_init = true;
- }
+ rand_ctx.a = fr_rand();
+ rand_ctx.b = fr_rand();
hp = fr_minmax_heap_alloc(NULL, minmax_heap_cmp, minmax_heap_thing, idx, 0);
TEST_CHECK(hp != NULL);