summaryrefslogtreecommitdiff
path: root/src/modules/montage/montage.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-05-21 23:27:02 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-05-21 23:27:02 -0700
commitc1fed8c508dd89c86de7dd647de0d014c441344e (patch)
treefac4d327c18fe5a2a205a2f4b4ad7f8287ec3536 /src/modules/montage/montage.c
parente21cdb67718a5d203372fd0c425e8be3e1d273f3 (diff)
modules/*: first stab at utilizing supplied seeds
This is a mostly mechanical change of using rand_r() in place of rand(), using the provided seed as the seed state. There's some outstanding rand()s outside of create_context() which should probably get switched over, with the seed being stowed in the context struct. I didn't bother going deeper on this at the moment in the interests of getting to sleep soon.
Diffstat (limited to 'src/modules/montage/montage.c')
-rw-r--r--src/modules/montage/montage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c
index a7030ff..1b79de5 100644
--- a/src/modules/montage/montage.c
+++ b/src/modules/montage/montage.c
@@ -90,7 +90,7 @@ static void * montage_create_context(unsigned seed, unsigned ticks, unsigned n_c
(void) til_module_randomize_setup(module, &setup, NULL);
if (module->create_context) /* FIXME errors */
- ctxt->contexts[i] = module->create_context(rand(), ticks, 1, setup);
+ ctxt->contexts[i] = module->create_context(rand_r(&seed), ticks, 1, setup);
til_setup_free(setup);
}
© All Rights Reserved