Skip to content
Snippets Groups Projects
Commit 64ca05c5 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

prng: treat unsuccessful init state

parent efe7db89
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,9 @@ double tls_rand()
#endif
dsfmt_init_gen_rand(s, seed);
(void)pthread_setspecific(tls_prng_key, s);
} else {
fprintf(stderr, "error: PRNG: can't set thread state\n");
return .0;
}
return dsfmt_genrand_close_open(s);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment