[libc] Remove use of random() from system/utest/evil/evil.c
This test is just using this to decide how to run a spammy malloc test,
so a simple cprng_draw() and mod is fine.
ZX-3307 #comment [libc] Remove use of random() from system/utest/evil/evil.c
Test: CQ
Change-Id: I3a3e7b8d3f7fd93b4c8f0219b74a9d0f3bd81aa5
diff --git a/system/utest/evil/evil.c b/system/utest/evil/evil.c
index 4e48edd..75493e4 100644
--- a/system/utest/evil/evil.c
+++ b/system/utest/evil/evil.c
@@ -103,7 +103,9 @@
} info_t;
int rnum(int m) {
- return (random() & 0x7FFFFFFFU) % m;
+ uint32_t data;
+ zx_cprng_draw((void*)&data, sizeof(data));
+ return (data & 0x7FFFFFFFU) % m;
}
void* blaster(void* arg) {