diff options
Diffstat (limited to 'src/bitvec.c')
-rw-r--r-- | src/bitvec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bitvec.c b/src/bitvec.c index f1f347fef..fd908f791 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -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 |