chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5735427
)
rand/noise.c (noise_timer): Actually update previous time.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 13 Jul 2013 15:34:40 +0000
(16:34 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 10 Mar 2014 02:04:16 +0000
(
02:04
+0000)
A long-standing bug. Oops.
rand/noise.c
patch
|
blob
|
blame
|
history
diff --git
a/rand/noise.c
b/rand/noise.c
index 00f036a8469ac50e6e4a16d95094b7dcf65023a0..7eb4c712932a0f9c7cc14e089d6c1d36ebf85086 100644
(file)
--- a/
rand/noise.c
+++ b/
rand/noise.c
@@
-113,6
+113,7
@@
static int timer(rand_pool *r, struct timeval *tv)
x = tv->tv_usec + MILLION * tv->tv_sec;
d = x ^ noise_last;
dd = d ^ noise_diff;
x = tv->tv_usec + MILLION * tv->tv_sec;
d = x ^ noise_last;
dd = d ^ noise_diff;
+ noise_last = x;
noise_diff = d;
de = bitcount(d);
dde = bitcount(dd);
noise_diff = d;
de = bitcount(d);
dde = bitcount(dd);