Commit 96bb4f7f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move clearing of cli->vsb up to also cover centralized error checks

parent efa265b0
......@@ -194,6 +194,8 @@ cls_dispatch(struct cli *cli, const struct cli_proto *cp,
AN(av);
VSB_clear(cli->sb);
if (ac > 1 && !strcmp(av[2], "-j"))
json = 1;
......@@ -221,7 +223,6 @@ cls_dispatch(struct cli *cli, const struct cli_proto *cp,
}
cli->result = CLIS_OK;
VSB_clear(cli->sb);
if (json)
cp->jsonfunc(cli, (const char * const *)av, cp->priv);
else
......
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