From 28a0b44e400e2408b65b2bad9a137ec4fc21516d Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 14 Apr 2022 16:56:07 -0700 Subject: modules/*: remove srand() initializations Just rely on til_init()'s srand() ensuring things are fresh. --- src/modules/sparkler/sparkler.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/modules/sparkler') diff --git a/src/modules/sparkler/sparkler.c b/src/modules/sparkler/sparkler.c index 272c0fd..f13954e 100644 --- a/src/modules/sparkler/sparkler.c +++ b/src/modules/sparkler/sparkler.c @@ -35,17 +35,11 @@ static sparkler_setup_t sparkler_default_setup; static void * sparkler_create_context(unsigned ticks, unsigned num_cpus, void *setup) { - static int initialized; sparkler_context_t *ctxt; if (!setup) setup = &sparkler_default_setup; - if (!initialized) { - srand(time(NULL) + getpid()); - initialized = 1; - } - ctxt = calloc(1, sizeof(sparkler_context_t)); if (!ctxt) return NULL; -- cgit v1.2.3