Refactor: node_alloc() always gets called with a pesi argument

parent 377ab450
......@@ -204,8 +204,9 @@ node_alloc(struct pesi *pesi)
struct node *node;
unsigned sz;
if (pesi != NULL &&
(node = VSTAILQ_FIRST(&pesi->nodestock)) != NULL) {
AN(pesi);
node = VSTAILQ_FIRST(&pesi->nodestock);
if (node != NULL) {
VSTAILQ_REMOVE_HEAD(&pesi->nodestock, sibling);
VSTAILQ_NEXT(node, sibling) = NULL;
CHECK_OBJ(node, NODE_MAGIC);
......
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