1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Create the "uptr" typedef (the same as uintptr_t when available) and use it

to cast pointers before comparison.

FossilOrigin-Name: 2484cc0c3ffc8834a155f89af1581bd07d453a90
This commit is contained in:
drh
2016-03-22 14:37:59 +00:00
parent 0b98207c5b
commit 3bfa7e82b6
4 changed files with 31 additions and 25 deletions

View File

@@ -2360,12 +2360,12 @@ int sqlite3BtreeOpen(
for(i=0; i<db->nDb; i++){
if( (pSib = db->aDb[i].pBt)!=0 && pSib->sharable ){
while( pSib->pPrev ){ pSib = pSib->pPrev; }
if( p->pBt<pSib->pBt ){
if( (uptr)p->pBt<(uptr)pSib->pBt ){
p->pNext = pSib;
p->pPrev = 0;
pSib->pPrev = p;
}else{
while( pSib->pNext && pSib->pNext->pBt<p->pBt ){
while( pSib->pNext && (uptr)pSib->pNext->pBt<(uptr)p->pBt ){
pSib = pSib->pNext;
}
p->pNext = pSib->pNext;