aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-04-05 13:35:43 +0000
committerdrh <drh@noemail.net>2016-04-05 13:35:43 +0000
commit1c715f67b9765e14d06288a1deb890170972ae4a (patch)
treeedb83d1cf370e86dd259ce7781e448bcf4bf2839 /src
parentcca6698408920f5c9062f07aee14acab9d3668f0 (diff)
downloadsqlite-1c715f67b9765e14d06288a1deb890170972ae4a.tar.gz
sqlite-1c715f67b9765e14d06288a1deb890170972ae4a.zip
Use SQLITE_WITHIN() for pointer range comparisons in some testing code.
FossilOrigin-Name: 7cacf4e954c8de5af5efb56d8271a5ac1edc1c04
Diffstat (limited to 'src')
-rw-r--r--src/btree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c
index 079fd0b9e..e5be8e0ef 100644
--- a/src/btree.c
+++ b/src/btree.c
@@ -6708,7 +6708,7 @@ static int editPage(
for(i=0; i<nNew && !CORRUPT_DB; i++){
u8 *pCell = pCArray->apCell[i+iNew];
int iOff = get2byteAligned(&pPg->aCellIdx[i*2]);
- if( pCell>=aData && pCell<&aData[pPg->pBt->usableSize] ){
+ if( SQLITE_WITHIN(pCell, aData, &aData[pPg->pBt->usableSize]) ){
pCell = &pTmp[pCell - aData];
}
assert( 0==memcmp(pCell, &aData[iOff],