Learn something new every day

today: VRBT_REMOVE returns the element argument no matter if it was
present in the tree or not, so it can not sensibly be used for assertions.
parent ff8f8bff
......@@ -562,7 +562,8 @@ vtx_retire(struct VSLQ *vslq, struct vtx **pvtx)
AZ(vtx->n_child);
AZ(vtx->n_descend);
vtx->n_childready = 0;
AN(VRBT_REMOVE(vtx_tree, &vslq->tree, &vtx->key));
// remove rval is no way to check if element was present
(void)VRBT_REMOVE(vtx_tree, &vslq->tree, &vtx->key);
vtx->key.vxid = 0;
vtx->flags = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment