Try to clarify for coverity how mgt_vcl_dep_del() works

Ref CID 1400491
parent a3555480
...@@ -226,14 +226,17 @@ mgt_vcl_del(struct vclprog *vp) ...@@ -226,14 +226,17 @@ mgt_vcl_del(struct vclprog *vp)
char *p; char *p;
struct vmoddep *vd; struct vmoddep *vd;
struct vmodfile *vf; struct vmodfile *vf;
struct vcldep *dep;
CHECK_OBJ_NOTNULL(vp, VCLPROG_MAGIC); CHECK_OBJ_NOTNULL(vp, VCLPROG_MAGIC);
assert(VTAILQ_EMPTY(&vp->dto)); assert(VTAILQ_EMPTY(&vp->dto));
mgt_vcl_symtab_clean(vp); mgt_vcl_symtab_clean(vp);
while (!VTAILQ_EMPTY(&vp->dfrom)) while ((dep = VTAILQ_FIRST(&vp->dfrom)) != NULL) {
mgt_vcl_dep_del(VTAILQ_FIRST(&vp->dfrom)); assert(dep->from == vp);
mgt_vcl_dep_del(dep);
}
VTAILQ_REMOVE(&vclhead, vp, list); VTAILQ_REMOVE(&vclhead, vp, list);
if (vp->state != VCL_STATE_LABEL) if (vp->state != VCL_STATE_LABEL)
......
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