chiark
/
gitweb
/
~mdw
/
runlisp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6445760
)
dump-runlisp-image.c: Initialize the random number generator a bit.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 13 May 2021 13:50:27 +0000
(14:50 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 13 May 2021 13:56:08 +0000
(14:56 +0100)
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.
dump-runlisp-image.c
patch
|
blob
|
blame
|
history
diff --git
a/dump-runlisp-image.c
b/dump-runlisp-image.c
index 7bd9ebaa7eeb5f5fe671dcb4749e4a2e996abf6f..97f854d7c649b5023d3a5bc69b87795a1c77e65b 100644
(file)
--- 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;