From: Mark Wooding Date: Thu, 13 May 2021 13:50:27 +0000 (+0100) Subject: dump-runlisp-image.c: Initialize the random number generator a bit. X-Git-Url: https://git.distorted.org.uk/~mdw/runlisp/commitdiff_plain/9ecf91d0ae3972c531a7312eb2e53d4a6b385860 dump-runlisp-image.c: Initialize the random number generator a bit. This is only used to pick names for temporary directories, so it doesn't matter that it's rather predictable. Indeed, even using the same sequence every time wasn't particularly bad, but we can do better, and so we should. --- diff --git a/dump-runlisp-image.c b/dump-runlisp-image.c index 7bd9eba..97f854d 100644 --- a/dump-runlisp-image.c +++ b/dump-runlisp-image.c @@ -1408,6 +1408,7 @@ int main(int argc, char *argv[]) /* Initial setup. */ set_progname(argv[0]); init_config(); + srand(time(0)); /* Parse the options. */ optprog = (/*unconst*/ char *)progname;