diff --git a/lib/fault-inject.c b/lib/fault-inject.c index f7210ad6cffd44c2486f8fef542dc5fa5affdae3..c5c7a762b850a30f23ad28e5a0f3a1f2e17e32be 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c @@ -122,7 +122,7 @@ bool should_fail(struct fault_attr *attr, ssize_t size) return false; } - if (attr->probability <= random32() % 100) + if (attr->probability <= prandom_u32() % 100) return false; if (!fail_stacktrace(attr)) diff --git a/lib/list_sort.c b/lib/list_sort.c index d7325c6b103f0be078ff3672c35c468ed35738f1..1183fa70a44d26cfc673b6d5d2f645b7026f50dd 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -229,7 +229,7 @@ static int __init list_sort_test(void) goto exit; } /* force some equivalencies */ - el->value = random32() % (TEST_LIST_LEN/3); + el->value = prandom_u32() % (TEST_LIST_LEN / 3); el->serial = i; el->poison1 = TEST_POISON1; el->poison2 = TEST_POISON2;