Commit fb0d4d2c authored by Nils Goroll's avatar Nils Goroll

magic pointers no more

parent 76dae2f4
......@@ -511,8 +511,7 @@ pesi_buf_bytes(struct req *req, enum vdp_action act, void **priv,
tree = pesi->pesi_tree->tree;
CHECK_OBJ_NOTNULL(tree, BYTES_TREE_MAGIC);
// magic pointers in use, so no check for len == 0
if (tree->retval || ptr == NULL)
if (tree->retval || ptr == NULL || len == 0)
return (tree->retval);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
......@@ -534,17 +533,6 @@ pesi_buf_bytes(struct req *req, enum vdp_action act, void **priv,
node->data.len = len;
node->data.act = act;
if (len == 0) {
// may be a magic pointer
AZ(node->data.st);
node->data.ptr = ptr;
node_insert(tree, parent, node);
VSLdbg(req, "bytes_add: exit len == 0");
return (tree->retval);
}
/*
* non-api knowledge from VDP_DeliverObj()
* final = req->objcore->flags & (OC_F_PRIVATE | OC_F_HFM | OC_F_HFP);
......
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