Refactor retval handling in vped_deliver()

parent cbe2a404
......@@ -901,7 +901,7 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
parent_gzip = &node->parent->nexus.gzip;
pp = ptr;
while (1) {
while (retval == 0 && tree->retval == 0) {
incl_cont = 0;
switch (pecx->state) {
case 0:
......@@ -1103,11 +1103,10 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
WRONG("FOO");
break;
}
if (retval)
tree->retval = retval;
if (tree->retval)
return (tree->retval);
}
if (retval != 0 && tree->retval == 0)
tree->retval = retval;
return (tree->retval);
}
const struct vdp VDP_pesi = {
......
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