Commit 03fe5347 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

param: Remove unncessary else branch

Better diff with the --ignore-all-space option.
parent edd71dd5
......@@ -685,23 +685,22 @@ tweak_generic_bits(struct vsb *vsb, const struct parspec *par, const char *arg,
desc, sign));
}
if (arg != NULL && arg != JSON_FMT) {
if (arg != NULL && arg != JSON_FMT)
return (bit_tweak(vsb, p, l, arg, tags, desc, sign));
} else {
if (arg == JSON_FMT)
VSB_putc(vsb, '"');
s = "";
for (j = 0; j < l; j++) {
if (bit(p, j, BTST)) {
VSB_printf(vsb, "%s%c%s", s, sign, tags[j]);
s = ",";
}
if (arg == JSON_FMT)
VSB_putc(vsb, '"');
s = "";
for (j = 0; j < l; j++) {
if (bit(p, j, BTST)) {
VSB_printf(vsb, "%s%c%s", s, sign, tags[j]);
s = ",";
}
if (*s == '\0')
VSB_cat(vsb, sign == '+' ? "none" : "all");
if (arg == JSON_FMT)
VSB_putc(vsb, '"');
}
if (*s == '\0')
VSB_cat(vsb, sign == '+' ? "none" : "all");
if (arg == JSON_FMT)
VSB_putc(vsb, '"');
return (0);
}
......
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