summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--rand.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d4ad91cf..3a3eb879 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-17 Kaz Kylheku <kaz@kylheku.com>
+
+ * rand.c (struct rand_state): Change cur member to unsigned.
+ This generates better code for rand32.
+
2014-12-16 Kaz Kylheku <kaz@kylheku.com>
* rand.c (rstate): New inline function.
diff --git a/rand.c b/rand.c
index 9a1e9d82..83d7dcff 100644
--- a/rand.c
+++ b/rand.c
@@ -59,7 +59,7 @@ typedef unsigned long rand32_t;
*/
struct rand_state {
rand32_t state[16];
- int cur;
+ unsigned cur;
};
val random_state_s;