mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Simplifications and performance improvement in pager_write().
FossilOrigin-Name: ab7aeeead395a05b91a921ef9ebe9252fffad667
This commit is contained in:
@@ -126,8 +126,8 @@ Bitvec *sqlite3BitvecCreate(u32 iSize){
|
||||
** If p is NULL (if the bitmap has not been created) or if
|
||||
** i is out of range, then return false.
|
||||
*/
|
||||
int sqlite3BitvecTest(Bitvec *p, u32 i){
|
||||
if( p==0 ) return 0;
|
||||
int sqlite3BitvecTestNotNull(Bitvec *p, u32 i){
|
||||
assert( p!=0 );
|
||||
i--;
|
||||
if( i>=p->iSize ) return 0;
|
||||
while( p->iDivisor ){
|
||||
@@ -149,6 +149,9 @@ int sqlite3BitvecTest(Bitvec *p, u32 i){
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
int sqlite3BitvecTest(Bitvec *p, u32 i){
|
||||
return p!=0 && sqlite3BitvecTestNotNull(p,i);
|
||||
}
|
||||
|
||||
/*
|
||||
** Set the i-th bit. Return 0 on success and an error code if
|
||||
|
Reference in New Issue
Block a user