mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
Simplified conditional for read-only lock in winceLockFile() function. Ticket #3991. (CVS 6958)
FossilOrigin-Name: a1c184cd2ac5a7559d787e6c34b1d0ce034d10cf
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
**
|
||||
** This file contains code that is specific to windows.
|
||||
**
|
||||
** $Id: os_win.c,v 1.156 2009/04/23 19:08:33 shane Exp $
|
||||
** $Id: os_win.c,v 1.157 2009/08/05 04:08:30 shane Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#if SQLITE_OS_WIN /* This file is used for windows only */
|
||||
@@ -483,9 +483,8 @@ static BOOL winceLockFile(
|
||||
}
|
||||
|
||||
/* Want a read-only lock? */
|
||||
else if ((dwFileOffsetLow >= SHARED_FIRST &&
|
||||
dwFileOffsetLow < SHARED_FIRST + SHARED_SIZE) &&
|
||||
nNumberOfBytesToLockLow == 1){
|
||||
else if (dwFileOffsetLow == SHARED_FIRST &&
|
||||
nNumberOfBytesToLockLow == 1){
|
||||
if (pFile->shared->bExclusive == 0){
|
||||
pFile->local.nReaders ++;
|
||||
if (pFile->local.nReaders == 1){
|
||||
@@ -504,6 +503,7 @@ static BOOL winceLockFile(
|
||||
bReturn = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Want a reserved lock? */
|
||||
else if (dwFileOffsetLow == RESERVED_BYTE && nNumberOfBytesToLockLow == 1){
|
||||
if (pFile->shared->bReserved == 0) {
|
||||
|
||||
Reference in New Issue
Block a user