]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove the call to srand() and add better comments to the sqliteOsRandomSeed()
authordrh <drh@noemail.net>
Sat, 12 Oct 2002 13:43:59 +0000 (13:43 +0000)
committerdrh <drh@noemail.net>
Sat, 12 Oct 2002 13:43:59 +0000 (13:43 +0000)
routine.  Ticket #163. (CVS 759)

FossilOrigin-Name: d87a886d8f63f54466848151e2b0e8565b338593

manifest
manifest.uuid
src/os.c

index 0f881de65f1294438873244c1dfe225a59a983fd..870bd2561e490b56d9507b142f37908bd95a765f 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\sbug\sin\sthe\sleft\souter\sjoin\slogic.\s(CVS\s758)
-D 2002-09-30T12:36:26
+C Remove\sthe\scall\sto\ssrand()\sand\sadd\sbetter\scomments\sto\sthe\ssqliteOsRandomSeed()\nroutine.\s\sTicket\s#163.\s(CVS\s759)
+D 2002-10-12T13:44:00
 F Makefile.in d6c9a85c2a5e696843201d090dcf8bf2f8716f2a
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -30,7 +30,7 @@ F src/hash.h cd0433998bc1a3759d244e1637fe5a3c13b53bf8
 F src/insert.c 764300a0bd8074a2174946c0bf8a550bd833397a
 F src/main.c ff7c05ef88fa1374e5540ce20173ae8e1836f8a4
 F src/md5.c fe4f9c9c6f71dfc26af8da63e4d04489b1430565
-F src/os.c 091a89297bf80927cde146cd1dbf89c908864f3a
+F src/os.c a099c7058e79f86edce9ca1f812078cdabe47a2c
 F src/os.h 3009379b06941e7796a9812d1b6cbc59b26248c8
 F src/pager.c 592e5931fdc65e952a6c3e152bc822580856532a
 F src/pager.h 6991c9c2dc5e4c7f2df4d4ba47d1c6458f763a32
@@ -149,7 +149,7 @@ F www/speed.tcl a20a792738475b68756ea7a19321600f23d1d803
 F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P 015425001813971f6d4c97c18d64c7f14fa1955f
-R 958c29732ae80c7acd4bb4c9f1286758
+P 6c0f44bd6374010f7a4a091e585eb36e0665f96f
+R 5d988e98e73febc16900dcc2d7b1140f
 U drh
-Z 500e5882699f5a41ba2a1838914ec9af
+Z 4347cb15b61079c5bf526a0f73fa4ac4
index b605a9543dfa42fced85159e21275cf17c7bed54..fb484560aaae67355d80fea1c7cec4daa38cf418 100644 (file)
@@ -1 +1 @@
-6c0f44bd6374010f7a4a091e585eb36e0665f96f
\ No newline at end of file
+d87a886d8f63f54466848151e2b0e8565b338593
\ No newline at end of file
index 2ad4041a629e1b37e564f976e1259f155de71744..7aaf7362f94c09e68e505775452b69683c275048 100644 (file)
--- a/src/os.c
+++ b/src/os.c
@@ -788,10 +788,11 @@ int sqliteOsUnlock(OsFile *id){
 }
 
 /*
-** Get information to seed the random number generator.
+** Get information to seed the random number generator.  The seed
+** is written into the buffer zBuf[256].  The calling function must
+** supply a sufficiently large buffer.
 */
 int sqliteOsRandomSeed(char *zBuf){
-  static int once = 1;
 #ifdef SQLITE_TEST
   /* When testing, always use the same random number sequence.
   ** This makes the tests repeatable.
@@ -807,12 +808,6 @@ int sqliteOsRandomSeed(char *zBuf){
 #if OS_WIN && !defined(SQLITE_TEST)
   GetSystemTime((LPSYSTEMTIME)zBuf);
 #endif
-  if( once ){
-    int seed;
-    memcpy(&seed, zBuf, sizeof(seed));
-    srand(seed);
-    once = 0;
-  }
   return SQLITE_OK;
 }