Changed random() to common_rand()

awsm
Skyb0rg007 6 years ago committed by Paul Khuong
parent aa7c8ab38c
commit 7bd17e4ad5

@ -159,7 +159,7 @@ test_init(bool init)
bytes = ck_bitmap_size(length); bytes = ck_bitmap_size(length);
bitmap = malloc(bytes); bitmap = malloc(bytes);
memset(bitmap, random(), bytes); memset(bitmap, common_rand(), bytes);
ck_bitmap_init(bitmap, length, init); ck_bitmap_init(bitmap, length, init);
@ -188,7 +188,7 @@ random_init(void)
ck_bitmap_init(bitmap, length, false); ck_bitmap_init(bitmap, length, false);
for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
if (random() & 1) { if (common_rand() & 1) {
ck_bitmap_set(bitmap, i); ck_bitmap_set(bitmap, i);
} }
} }
@ -259,7 +259,7 @@ random_test(unsigned int seed)
ck_bitmap_t *x, *x_copy, *y; ck_bitmap_t *x, *x_copy, *y;
unsigned int i; unsigned int i;
srandom(seed); common_srand(seed);
test_init(false); test_init(false);
test_init(true); test_init(true);

Loading…
Cancel
Save