aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2012-10-15 14:25:16 +0000
committerdrh <drh@noemail.net>2012-10-15 14:25:16 +0000
commit036a71a97c34935221e49e8d0658702656599f1e (patch)
tree7ba3a35141742194d360cb49e590c7fd310c8afc /src/os_unix.c
parentd1102b1ec7d50045cbbcf2575eacb2d423361fc7 (diff)
parent7eb05752873afce76d2bc00da8ad4eaa083aec0c (diff)
downloadsqlite-036a71a97c34935221e49e8d0658702656599f1e.tar.gz
sqlite-036a71a97c34935221e49e8d0658702656599f1e.zip
Merge all the latest core changes into the sessions branch.
FossilOrigin-Name: 76767d651fe733614b1719aef9ad5ed4568234e4
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 0852eb1a8..5fbac0071 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2086,13 +2086,13 @@ static int dotlockUnlock(sqlite3_file *id, int eFileLock) {
** Close a file. Make sure the lock has been released before closing.
*/
static int dotlockClose(sqlite3_file *id) {
- int rc;
+ int rc = SQLITE_OK;
if( id ){
unixFile *pFile = (unixFile*)id;
dotlockUnlock(id, NO_LOCK);
sqlite3_free(pFile->lockingContext);
+ rc = closeUnixFile(id);
}
- rc = closeUnixFile(id);
return rc;
}
/****************** End of the dot-file lock implementation *******************
@@ -2296,10 +2296,12 @@ static int flockUnlock(sqlite3_file *id, int eFileLock) {
** Close a file.
*/
static int flockClose(sqlite3_file *id) {
+ int rc = SQLITE_OK;
if( id ){
flockUnlock(id, NO_LOCK);
+ rc = closeUnixFile(id);
}
- return closeUnixFile(id);
+ return rc;
}
#endif /* SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORK */
@@ -4098,7 +4100,7 @@ static int unixShmMap(
if( pShmNode->h>=0 ){
pMem = mmap(0, szRegion,
pShmNode->isReadonly ? PROT_READ : PROT_READ|PROT_WRITE,
- MAP_SHARED, pShmNode->h, pShmNode->nRegion*szRegion
+ MAP_SHARED, pShmNode->h, szRegion*(i64)pShmNode->nRegion
);
if( pMem==MAP_FAILED ){
rc = unixLogError(SQLITE_IOERR_SHMMAP, "mmap", pShmNode->zFilename);