rand/noise.c (noise_timer): Actually update previous time.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 13 Jul 2013 15:34:40 +0000 (16:34 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 10 Mar 2014 02:04:16 +0000 (02:04 +0000)
A long-standing bug.  Oops.

rand/noise.c

index 00f036a..7eb4c71 100644 (file)
@@ -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;
+  noise_last = x;
   noise_diff = d;
   de = bitcount(d);
   dde = bitcount(dd);