1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Make greater use of the SQLITE_WITHIN macro.

FossilOrigin-Name: f2fc3aede55c8fa0351697f9f5ce4e544334c9af
This commit is contained in:
drh
2015-12-16 13:07:35 +00:00
parent 991c5d6413
commit 8b0ba7b0b8
4 changed files with 12 additions and 12 deletions

View File

@@ -6470,7 +6470,7 @@ static int rebuildPage(
pData = pEnd;
for(i=0; i<nCell; i++){
u8 *pCell = apCell[i];
if( pCell>aData && pCell<pEnd ){
if( SQLITE_WITHIN(pCell,aData,pEnd) ){
pCell = &pTmp[pCell - aData];
}
pData -= szCell[i];
@@ -6581,7 +6581,7 @@ static int pageFreeArray(
for(i=iFirst; i<iEnd; i++){
u8 *pCell = pCArray->apCell[i];
if( pCell>=pStart && pCell<pEnd ){
if( SQLITE_WITHIN(pCell, pStart, pEnd) ){
int sz;
/* No need to use cachedCellSize() here. The sizes of all cells that
** are to be freed have already been computing while deciding which