home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8b72ac
)
Let's see if this provides better pseudo-randomness.
author
Christian Heller
<c.heller@plomlompom.de>
Thu, 29 Aug 2013 04:05:13 +0000
(06:05 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Thu, 29 Aug 2013 04:05:13 +0000
(06:05 +0200)
src/rrand.c
patch
|
blob
|
history
diff --git
a/src/rrand.c
b/src/rrand.c
index f790ac1733e9976bdd2faf6dc76c6fd73431002f..e2b459b4f7b8a49f4610a1648d88e1ef90d9050f 100644
(file)
--- a/
src/rrand.c
+++ b/
src/rrand.c
@@
-10,7
+10,7
@@
static uint32_t seed = 0;
extern uint16_t rrand()
{
/* Constants as recommended by POSIX.1-2001 (see man page rand(3)). */
- seed = ((seed * 1103515245) + 12345) % 214748364
8
;
+ seed = ((seed * 1103515245) + 12345) % 214748364
7
;
return (seed >> 16); /* Ignore less random least significant 16 bits. */
}