aboutsummaryrefslogtreecommitdiff
path: root/src/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/random.c')
-rw-r--r--src/random.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/random.c b/src/random.c
index eb3ec1958..f90a34edf 100644
--- a/src/random.c
+++ b/src/random.c
@@ -15,7 +15,7 @@
** Random numbers are used by some of the database backends in order
** to generate random integer keys for tables or random filenames.
**
-** $Id: random.c,v 1.28 2008/12/08 18:19:18 drh Exp $
+** $Id: random.c,v 1.29 2008/12/10 19:26:24 drh Exp $
*/
#include "sqliteInt.h"
@@ -45,7 +45,7 @@ static SQLITE_WSD struct sqlite3PrngType {
** (Later): Actually, OP_NewRowid does not depend on a good source of
** randomness any more. But we will leave this code in all the same.
*/
-static int randomByte(void){
+static u8 randomByte(void){
unsigned char t;
@@ -79,7 +79,7 @@ static int randomByte(void){
wsdPrng.i = 0;
sqlite3OsRandomness(sqlite3_vfs_find(0), 256, k);
for(i=0; i<256; i++){
- wsdPrng.s[i] = i;
+ wsdPrng.s[i] = (u8)i;
}
for(i=0; i<256; i++){
wsdPrng.j += wsdPrng.s[i] + k[i];