summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-07-20 18:01:21 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-07-20 18:01:21 -0700
commitb68ec04f86f83ba3d7926ffafc1d8a6456e72c05 (patch)
treea87980dbb7dcea7b5b2f5fdbc1f86c3463f38ec1 /src
parent1e461f6cc82cb8c30027b120a8b07693fb32edfd (diff)
modules/drizzle: switch to rand_r w/local seed
More obvious migrations to using the supplied seed
Diffstat (limited to 'src')
-rw-r--r--src/modules/drizzle/drizzle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/drizzle/drizzle.c b/src/modules/drizzle/drizzle.c
index 76531e8..ec97d16 100644
--- a/src/modules/drizzle/drizzle.c
+++ b/src/modules/drizzle/drizzle.c
@@ -113,8 +113,8 @@ static void drizzle_prepare_frame(til_module_context_t *context, unsigned ticks,
*res_frame_plan = (til_frame_plan_t){ .fragmenter = til_fragmenter_slice_per_cpu };
for (int i = 0; i < DRIZZLE_CNT; i++) {
- int x = rand() % (PUDDLE_SIZE - 1);
- int y = rand() % (PUDDLE_SIZE - 1);
+ int x = rand_r(&ctxt->til_module_context.seed) % (PUDDLE_SIZE - 1);
+ int y = rand_r(&ctxt->til_module_context.seed) % (PUDDLE_SIZE - 1);
/* TODO: puddle should probably offer a normalized way of setting an
* area to a value, so if PUDDLE_SIZE changes this automatically
© All Rights Reserved