aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-08-22 15:21:54 +0000
committerdrh <drh@noemail.net>2017-08-22 15:21:54 +0000
commit2e2338101a28a647eaa37cf20945087fd96aaf10 (patch)
treeef1b122644b70241cb8d24bd24e101b452823edf /src/os_unix.c
parentb40f06c62dc64e516510b8221950e1d6b687f7ee (diff)
downloadsqlite-2e2338101a28a647eaa37cf20945087fd96aaf10.tar.gz
sqlite-2e2338101a28a647eaa37cf20945087fd96aaf10.zip
Fix error tests in seldom-used compile-time branches of the unix backend.
FossilOrigin-Name: 885c2b44a44f8d054014e4079b2cac8279c11d13206d5b5215189ef75b9c5254
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index bd646d6e7..0d7e49414 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2321,7 +2321,7 @@ static int flockCheckReservedLock(sqlite3_file *id, int *pResOut){
OSTRACE(("TEST WR-LOCK %d %d %d (flock)\n", pFile->h, rc, reserved));
#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
- if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
+ if( (rc & 0xff) == SQLITE_IOERR ){
rc = SQLITE_OK;
reserved=1;
}
@@ -2388,7 +2388,7 @@ static int flockLock(sqlite3_file *id, int eFileLock) {
OSTRACE(("LOCK %d %s %s (flock)\n", pFile->h, azFileLock(eFileLock),
rc==SQLITE_OK ? "ok" : "failed"));
#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
- if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
+ if( (rc & 0xff) == SQLITE_IOERR ){
rc = SQLITE_BUSY;
}
#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
@@ -2925,7 +2925,7 @@ static int afpLock(sqlite3_file *id, int eFileLock){
/* Can't reestablish the shared lock. Sqlite can't deal, this is
** a critical I/O error
*/
- rc = ((failed & SQLITE_IOERR) == SQLITE_IOERR) ? failed2 :
+ rc = ((failed & 0xff) == SQLITE_IOERR) ? failed2 :
SQLITE_IOERR_LOCK;
goto afp_end_lock;
}