summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-07-07 10:15:32 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-07-07 10:48:25 +0100
commit0d78ad871e85a74a2a7eac2f2a2ff94776f35e77 (patch)
treea29ea7098cc49b1116db16f219bdc662e04ac874 /sot
parent807b696c5c15dc2d8255116305fd28ba60f201c0 (diff)
DBG_ASSERT->assert when followed by dereference
Change-Id: Ic1c999ffdc391ea01be5711721e7c9e63179473e
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgavl.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index 3cb48c2a1da9..93869ac9b042 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -131,7 +131,7 @@ short StgAvlNode::Adjust( StgAvlNode** pHeavy, StgAvlNode* pNew )
StgAvlNode* StgAvlNode::RotLL()
{
- OSL_ENSURE( pLeft, "The pointer is not allowed to be NULL!" );
+ assert(pLeft && "The pointer is not allowed to be NULL!");
StgAvlNode *pHeavy = pLeft;
pLeft = pHeavy->pRight;
pHeavy->pRight = this;
@@ -172,10 +172,9 @@ StgAvlNode* StgAvlNode::RotLR()
}
// perform RR rotation and return new root
-
StgAvlNode* StgAvlNode::RotRR()
{
- OSL_ENSURE( pRight, "The pointer is not allowed to be NULL!" );
+ assert(pRight && "The pointer is not allowed to be NULL!" );
StgAvlNode* pHeavy = pRight;
pRight = pHeavy->pLeft;
pHeavy->pLeft = this;
@@ -184,10 +183,9 @@ StgAvlNode* StgAvlNode::RotRR()
}
// perform the RL rotation and return the new root
-
StgAvlNode* StgAvlNode::RotRL()
{
- OSL_ENSURE( pRight && pRight->pLeft, "The pointer is not allowed to be NULL!" );
+ assert(pRight && pRight->pLeft && "The pointer is not allowed to be NULL!");
StgAvlNode* pHeavy = pRight;
StgAvlNode* pNewRoot = pHeavy->pLeft;
pHeavy->pLeft = pNewRoot->pRight;
@@ -297,7 +295,8 @@ bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
short nRes = (*pRoot)->Locate( pIns, &pPivot, &pParent, &pPrev );
if( !nRes )
return false;
- OSL_ENSURE( pPivot && pPrev, "The pointers may not be NULL!" );
+
+ assert(pPivot && pPrev && "The pointers may not be NULL!");
// add new node
if( nRes < 0 )