refactor: add assert in hash.
This commit is contained in:
parent
f8d8beadeb
commit
ff615a066c
|
@ -774,8 +774,11 @@ static void *taosHashReleaseNode(SHashObj *pHashObj, void *p, int *slot) {
|
||||||
if (pOld->refCount <=0) {
|
if (pOld->refCount <=0) {
|
||||||
if (prevNode) {
|
if (prevNode) {
|
||||||
prevNode->next = pOld->next;
|
prevNode->next = pOld->next;
|
||||||
|
ASSERT(prevNode->next != prevNode);
|
||||||
} else {
|
} else {
|
||||||
pe->next = pOld->next;
|
pe->next = pOld->next;
|
||||||
|
SHashNode* x = pe->next;
|
||||||
|
ASSERT(x->next != x);
|
||||||
}
|
}
|
||||||
|
|
||||||
pe->num--;
|
pe->num--;
|
||||||
|
|
Loading…
Reference in New Issue