From: dan Date: Thu, 26 Aug 2010 11:27:22 +0000 (+0000) Subject: Remove unreachable condition from rtree.c. X-Git-Tag: experimental~114 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c23454023ec1506bb1ee5ecff8923ed289ef6187;p=thirdparty%2Fsqlite.git Remove unreachable condition from rtree.c. FossilOrigin-Name: 90f40cd36860d3af13ec24575dff7cc1f57ac493 --- diff --git a/ext/rtree/rtree.c b/ext/rtree/rtree.c index 65786fe967..5e11d89266 100644 --- a/ext/rtree/rtree.c +++ b/ext/rtree/rtree.c @@ -2162,6 +2162,7 @@ static void fixBoundingBox(Rtree *pRtree, RtreeNode *pNode){ ** cell, adjust the r-tree data structure if required. */ static int deleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell, int iHeight){ + RtreeNode *pParent; int rc; if( SQLITE_OK!=(rc = fixLeafParent(pRtree, pNode)) ){ @@ -2178,11 +2179,10 @@ static int deleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell, int iHeight){ ** cell in the parent node so that it tightly contains the updated ** node. */ - if( pNode->iNode!=1 ){ - RtreeNode *pParent = pNode->pParent; - if( (pParent->iNode!=1 || NCELL(pParent)!=1) - && (NCELL(pNode)pParent; + assert( pParent || pNode->iNode==1 ); + if( pParent ){ + if( NCELL(pNode)