Fix privs panic formatting

55dffc35 introduced a PAN_dump_struct()
call, which implies printing '{' and VSB_indent(vsb, 2). Fix missing '}'
and wrong indentation.

Also remove redundant "priv" output, which now happens in PAN_dump_struct()

Diff best viewed ignoring whitespace (-b option).
parent 4bb1a118
......@@ -77,17 +77,19 @@ pan_privs(struct vsb *vsb, const struct vrt_privs *privs)
//lint -e{774}
if (p == NULL) {
// should never happen
VSB_printf(vsb, "priv NULL vmod %jx\n",
VSB_printf(vsb, "NULL vmod %jx\n",
(uintmax_t)vp->vmod_id);
continue;
} else {
m = p->methods;
VSB_printf(vsb,
"{p %p l %ld m %p t \"%s\"} vmod %jx\n",
p->priv, p->len, m,
m != NULL ? m->type : "",
(uintmax_t)vp->vmod_id
);
}
m = p->methods;
VSB_printf(vsb,
"priv {p %p l %ld m %p t \"%s\"} vmod %jx\n",
p->priv, p->len, m,
m != NULL ? m->type : "",
(uintmax_t)vp->vmod_id
);
VSB_indent(vsb, -2);
VSB_cat(vsb, "},\n");
}
VSB_indent(vsb, -2);
VSB_cat(vsb, "},\n");
......
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