]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix uninitialized variable in os_unix.c. (CVS 3006)
authordrh <drh@noemail.net>
Mon, 23 Jan 2006 16:24:54 +0000 (16:24 +0000)
committerdrh <drh@noemail.net>
Mon, 23 Jan 2006 16:24:54 +0000 (16:24 +0000)
FossilOrigin-Name: 892e644d20b9d132cf29242a9bca0116ebe6968f

manifest
manifest.uuid
src/os_unix.c

index 8306f9ed20aec617ba132bd28b70c90276b78991..7da46298322e4974c227d364aadc9e7697ac5dc5 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\s"#ifndef\sNDEBUG"\saround\ssqlite3pager_iswriteable()\s(only\sused\sin\sassert()\sexpressions).\sAlso\sset\sthe\sinternal\spage\snumber\sof\sa\spage\sto\szero\sif\sit\sfails\sto\sinitialise.\s(CVS\s3005)
-D 2006-01-23T16:21:06
+C Fix\suninitialized\svariable\sin\sos_unix.c.\s(CVS\s3006)
+D 2006-01-23T16:24:54
 F Makefile.in ab3ffd8d469cef4477257169b82810030a6bb967
 F Makefile.linux-gcc aee18d8a05546dcf1888bd4547e442008a49a092
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -55,7 +55,7 @@ F src/os.h 93035a0e3b9dd05cdd0aaef32ea28ca28e02fe78
 F src/os_common.h 061fba8511a656b118551424f64e366ad0d4cb3b
 F src/os_test.c 49833426101f99aee4bb5f6a44b7c4b2029fda1c
 F src/os_test.h 903c93554c23d88f34f667f1979e4a1cee792af3
-F src/os_unix.c 38a55e51fb2c6f32c0ce86d274f5787f6c3668ed
+F src/os_unix.c b25eca667f926d24b542fb20378b3665feccfe2b
 F src/os_unix.h 5768d56d28240d3fe4537fac08cc85e4fb52279e
 F src/os_win.c 438e6587e1767c51e9e0e781e3bb52f72764e67b
 F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
@@ -344,7 +344,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl a99cf5f6d8bd4d5537584a2b342f0fb9fa601d8b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 4c1818ecebc79f5f7e5f4a7843b5fae02a251f47
-R dc39c66443bc66c77af27ec2ccf42213
-U danielk1977
-Z dc9d99a7bc9530a8fd2d3dd016484ec8
+P 77969c671c6ea1b5a2739f62de2bec10cc651b9e
+R 5fb0d48ea05ce967ee113d7e28f8e1a6
+U drh
+Z 6d4b56c231aebc3a1fa59b1e9fa044bb
index 101ca25c3134958e49f4de9d4ba84e0b9e95008f..356a61105d6baf919ae48a3898b7178971ea7468 100644 (file)
@@ -1 +1 @@
-77969c671c6ea1b5a2739f62de2bec10cc651b9e
\ No newline at end of file
+892e644d20b9d132cf29242a9bca0116ebe6968f
\ No newline at end of file
index b9c0121383083069cfed0e96236b83e46a137f7e..aa4f5736feb246893e70c2e8e092a5ed293d15bd 100644 (file)
@@ -693,8 +693,6 @@ int sqlite3UnixOpenReadWrite(
 
   CRASH_TEST_OVERRIDE(sqlite3CrashOpenReadWrite, zFilename, pId, pReadonly);
   assert( 0==*pId );
-  f.dirfd = -1;
-  SET_THREADID(&f);
   f.h = open(zFilename, O_RDWR|O_CREAT|O_LARGEFILE|O_BINARY,
                           SQLITE_DEFAULT_FILE_PERMISSIONS);
   if( f.h<0 ){
@@ -718,7 +716,6 @@ int sqlite3UnixOpenReadWrite(
     close(f.h);
     return SQLITE_NOMEM;
   }
-  f.locktype = 0;
   TRACE3("OPEN    %-3d %s\n", f.h, zFilename);
   return allocateUnixFile(&f, pId);
 }
@@ -747,8 +744,6 @@ int sqlite3UnixOpenExclusive(const char *zFilename, OsFile **pId, int delFlag){
   if( access(zFilename, 0)==0 ){
     return SQLITE_CANTOPEN;
   }
-  SET_THREADID(&f);
-  f.dirfd = -1;
   f.h = open(zFilename,
                 O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW|O_LARGEFILE|O_BINARY,
                 SQLITE_DEFAULT_FILE_PERMISSIONS);
@@ -763,7 +758,6 @@ int sqlite3UnixOpenExclusive(const char *zFilename, OsFile **pId, int delFlag){
     unlink(zFilename);
     return SQLITE_NOMEM;
   }
-  f.locktype = 0;
   if( delFlag ){
     unlink(zFilename);
   }
@@ -784,8 +778,6 @@ int sqlite3UnixOpenReadOnly(const char *zFilename, OsFile **pId){
 
   CRASH_TEST_OVERRIDE(sqlite3CrashOpenReadOnly, zFilename, pId, 0);
   assert( 0==*pId );
-  SET_THREADID(&f);
-  f.dirfd = -1;
   f.h = open(zFilename, O_RDONLY|O_LARGEFILE|O_BINARY);
   if( f.h<0 ){
     return SQLITE_CANTOPEN;
@@ -797,9 +789,7 @@ int sqlite3UnixOpenReadOnly(const char *zFilename, OsFile **pId){
     close(f.h);
     return SQLITE_NOMEM;
   }
-  f.locktype = 0;
   TRACE3("OPEN-RO %-3d %s\n", f.h, zFilename);
-
   return allocateUnixFile(&f, pId);
 }
 
@@ -1583,6 +1573,10 @@ static const IoMethod sqlite3UnixIoMethod = {
 */
 static int allocateUnixFile(unixFile *pInit, OsFile **pId){
   unixFile *pNew;
+  pInit->dirfd = -1;
+  pInit->fullSync = 0;
+  pInit->locktype = 0;
+  SET_THREADID(pInit);
   pNew = sqliteMalloc( sizeof(unixFile) );
   if( pNew==0 ){
     close(pInit->h);