summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_evpn_vty.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-08-30 10:46:00 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-08-30 10:46:00 +0200
commit8248a4bc219c1a21147f6591597ff775f7c32fb0 (patch)
tree3e1d71ae5f699f48202a141fdedfa9f1ceee17ed /bgpd/bgp_evpn_vty.c
parentbgpd: Remove redundant test against ifp for DEBUG messages (diff)
downloadfrr-8248a4bc219c1a21147f6591597ff775f7c32fb0.tar.xz
frr-8248a4bc219c1a21147f6591597ff775f7c32fb0.zip
bgpd: Break immediatelly and print vty_out instead of double checking for JSON
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/bgp_evpn_vty.c')
-rw-r--r--bgpd/bgp_evpn_vty.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 427716233..f6b87dccd 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -1012,13 +1012,12 @@ static void show_l3vni_entry(struct vty *vty, struct bgp *bgp,
/* If there are multiple export RTs we break here and show only
* one */
- if (!json)
+ if (!json) {
+ vty_out(vty, "%-37s", vrf_id_to_name(bgp->vrf_id));
break;
+ }
}
- if (!json)
- vty_out(vty, "%-37s", vrf_id_to_name(bgp->vrf_id));
-
if (json) {
char vni_str[VNI_STR_LEN];
@@ -1151,13 +1150,13 @@ static void show_vni_entry(struct hash_bucket *bucket, void *args[])
/* If there are multiple export RTs we break here and show only
* one */
- if (!json)
+ if (!json) {
+ vty_out(vty, "%-37s",
+ vrf_id_to_name(vpn->tenant_vrf_id));
break;
+ }
}
- if (!json)
- vty_out(vty, "%-37s", vrf_id_to_name(vpn->tenant_vrf_id));
-
if (json) {
char vni_str[VNI_STR_LEN];