else {
*bgp = bgp_lookup_by_name(vrf_name);
if (!*bgp) {
- use_json
- ? vty_out(vty, "{}\n")
- : vty_out(vty,
- "View/Vrf specified is unknown: %s\n",
- vrf_name);
+ vty_out(vty,
+ use_json
+ ? "{}\n"
+ : "View/Vrf specified is unknown: %s\n",
+ vrf_name);
*idx = 0;
return 0;
}
} else {
*bgp = bgp_get_default();
if (!*bgp) {
- use_json
- ? vty_out(vty, "{}\n")
- : vty_out(vty,
- "Unable to find default BGP instance\n");
+ vty_out(vty,
+ use_json
+ ? "{}\n"
+ : "Unable to find default BGP instance\n");
*idx = 0;
return 0;
}
if (use_json && is_wildcard)
vty_out(vty, "}\n");
else if (!nbr_output)
- use_json ? vty_out(vty, "{}\n")
- : vty_out(vty, "%% No BGP neighbors found\n");
+ vty_out(vty, use_json ? "{}\n" : "%% No BGP neighbors found\n");
}
static void bgp_show_all_instances_summary_vty(struct vty *vty, afi_t afi,
bgp = bgp_lookup_by_name(name);
if (!bgp) {
- use_json
- ? vty_out(vty, "{}\n")
- : vty_out(vty,
- "%% BGP instance not found\n");
+ vty_out(vty,
+ use_json
+ ? "{}\n"
+ : "%% BGP instance not found\n");
return CMD_WARNING;
}
if (bgp)
bgp_show_summary_afi_safi(vty, bgp, afi, safi, use_json, NULL);
else {
- use_json ? vty_out(vty, "{}\n")
- : vty_out(vty, "%% No such BGP instance exist\n");
+ vty_out(vty,
+ use_json ? "{}\n" : "%% No such BGP instance exist\n");
return CMD_WARNING;
}
json);
}
json_object_free(json);
- } else {
- use_json ? vty_out(vty, "{}\n")
- : vty_out(vty, "%% BGP instance not found\n");
- }
+ } else
+ vty_out(vty, use_json ? "{}\n" : "%% BGP instance not found\n");
return CMD_SUCCESS;
}