diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 058ac34f1e..082ecbe69c 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -3331,13 +3331,9 @@ static void evpn_show_vni(struct vty *vty, struct bgp *bgp, vni_t vni, } } - if (!found) { - if (json) { - vty_out(vty, "{}\n"); - } else { - vty_out(vty, "VNI not found\n"); - return; - } + if (!found && !json) { + vty_out(vty, "VNI not found\n"); + return; } }