diff options
author | drh <drh@noemail.net> | 2009-01-16 23:47:42 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2009-01-16 23:47:42 +0000 |
commit | a6d90f0ddd1d852b4db3452e46f27551aed343cf (patch) | |
tree | 30e013c58de245c1ddc52c06f8bec242f6803164 /src/os_unix.c | |
parent | db3403973c5502ca99cf24d52e97fc70b83f1d64 (diff) | |
download | sqlite-a6d90f0ddd1d852b4db3452e46f27551aed343cf.tar.gz sqlite-a6d90f0ddd1d852b4db3452e46f27551aed343cf.zip |
Remove a harmless UMR that occurs inside some debugging code. (CVS 6190)
FossilOrigin-Name: 191c399fc6354b35477ec21f685377e2af26f49b
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index b7e6f35da..918a1edf6 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -43,7 +43,7 @@ ** * Definitions of sqlite3_vfs objects for all locking methods ** plus implementations of sqlite3_os_init() and sqlite3_os_end(). ** -** $Id: os_unix.c,v 1.237 2009/01/15 04:30:03 drh Exp $ +** $Id: os_unix.c,v 1.238 2009/01/16 23:47:42 drh Exp $ */ #include "sqliteInt.h" #if SQLITE_OS_UNIX /* This file is used on unix only */ @@ -2758,11 +2758,12 @@ static int unixWrite( unixFile *pFile = (unixFile*)id; pFile->dbUpdate = 1; /* The database has been modified */ if( offset<=24 && offset+amt>=27 ){ + int rc; char oldCntr[4]; SimulateIOErrorBenign(1); - seekAndRead(pFile, 24, oldCntr, 4); + rc = seekAndRead(pFile, 24, oldCntr, 4); SimulateIOErrorBenign(0); - if( memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){ + if( rc!=4 || memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){ pFile->transCntrChng = 1; /* The transaction counter has changed */ } } |