aboutsummaryrefslogtreecommitdiff
path: root/src/build.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2004-02-11 09:46:30 +0000
committerdrh <drh@noemail.net>2004-02-11 09:46:30 +0000
commitbbd82df617ee94a0371e867a95cee007f4473bd8 (patch)
tree06f6f9a32dd4e4ae13675aa4f1e29aa07fdca9bc /src/build.c
parent9eb9e26b82e5b973f81f4429f9e1978a058391e9 (diff)
downloadsqlite-bbd82df617ee94a0371e867a95cee007f4473bd8.tar.gz
sqlite-bbd82df617ee94a0371e867a95cee007f4473bd8.zip
Refactor the interface to the randomness generator. (CVS 1224)
FossilOrigin-Name: f2bdccf4bb2f796aafb64c33e55f62a1794d750c
Diffstat (limited to 'src/build.c')
-rw-r--r--src/build.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/build.c b/src/build.c
index 20d574818..e7f56f7fe 100644
--- a/src/build.c
+++ b/src/build.c
@@ -23,7 +23,7 @@
** ROLLBACK
** PRAGMA
**
-** $Id: build.c,v 1.164 2004/01/19 04:55:56 jplyon Exp $
+** $Id: build.c,v 1.165 2004/02/11 09:46:31 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -819,7 +819,9 @@ void sqliteAddCollateType(Parse *pParse, int collType){
*/
void sqliteChangeCookie(sqlite *db, Vdbe *v){
if( db->next_cookie==db->aDb[0].schema_cookie ){
- db->next_cookie = db->aDb[0].schema_cookie + sqliteRandomByte() + 1;
+ unsigned char r;
+ sqliteRandomness(1, &r);
+ db->next_cookie = db->aDb[0].schema_cookie + r + 1;
db->flags |= SQLITE_InternChanges;
sqliteVdbeAddOp(v, OP_Integer, db->next_cookie, 0);
sqliteVdbeAddOp(v, OP_SetCookie, 0, 0);