diff --git a/lib/nexthop.c b/lib/nexthop.c index 379cf3581883..0d17b79bdfe2 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -1224,7 +1224,7 @@ void nexthop_json_helper(json_object *json_nexthop, json_object_int_add(json_nexthop, "flags", nexthop->flags); if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_DUPLICATE)) - json_object_boolean_true_add(json_nexthop, "duplicate"); + json_object_boolean_true_add(json_nexthop, "duplicate"); if (CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)) json_object_boolean_true_add(json_nexthop, "fib"); @@ -1296,7 +1296,7 @@ void nexthop_json_helper(json_object *json_nexthop, json_object_string_add(json_nexthop, "vrf", vrf_id_to_name(nexthop->vrf_id)); if (brief) - return; + return; /* This nexthop is a resolver for the parent nexthop. * Set resolver flag for better clarity and delimiter diff --git a/zebra/zebra_evpn.c b/zebra/zebra_evpn.c index b92922d22d1e..494978f6ef4a 100644 --- a/zebra/zebra_evpn.c +++ b/zebra/zebra_evpn.c @@ -111,7 +111,7 @@ void zebra_evpn_print(struct zebra_evpn *zevpn, void **ctxt) json_object_string_add(json, "type", "L2"); json_object_int_add(json, "vlan", zevpn->vid); json_object_string_add(json, "bridge", - zevpn->bridge_if ? zevpn->bridge_if->name: ""); + zevpn->bridge_if ? zevpn->bridge_if->name : ""); json_object_string_add(json, "tenantVrf", vrf_id_to_name(zevpn->vrf_id)); } diff --git a/zebra/zebra_l2_bridge_if.c b/zebra/zebra_l2_bridge_if.c index bcb162fc40dc..bfb227552593 100644 --- a/zebra/zebra_l2_bridge_if.c +++ b/zebra/zebra_l2_bridge_if.c @@ -55,8 +55,7 @@ #include "zebra/zebra_evpn_vxlan.h" #include "zebra/zebra_router.h" -static void zebra_l2_brvlan_print_mac_hash(struct hash_bucket *bucket, - void *ctxt) +static void zebra_l2_brvlan_print_mac_hash(struct hash_bucket *bucket, void *ctxt) { struct zebra_l2_brvlan_mac_ctx *ctx; struct vty *vty; @@ -94,8 +93,7 @@ static unsigned int zebra_l2_bridge_vlan_hash_keymake(const void *p) return jhash(&bvlan->vid, sizeof(bvlan->vid), 0); } -void zebra_l2_brvlan_print_macs(struct vty *vty, struct interface *br_if, - vlanid_t vid, bool uj) +void zebra_l2_brvlan_print_macs(struct vty *vty, struct interface *br_if, vlanid_t vid, bool uj) { struct zebra_if *zif; struct zebra_l2_bridge_if *br; @@ -105,9 +103,10 @@ void zebra_l2_brvlan_print_macs(struct vty *vty, struct interface *br_if, zif = (struct zebra_if *)br_if->info; br = BRIDGE_FROM_ZEBRA_IF(zif); if (!br) { - return; + return; } json_object *json_obj = NULL, *json_mac_obj = NULL; + if (uj) { /* json format */ json_obj = json_object_new_object(); json_mac_obj = json_object_new_object(); diff --git a/zebra/zebra_l2_bridge_if.h b/zebra/zebra_l2_bridge_if.h index 00041ad13dd9..0d0aa76349f8 100644 --- a/zebra/zebra_l2_bridge_if.h +++ b/zebra/zebra_l2_bridge_if.h @@ -64,8 +64,8 @@ extern int zebra_l2_bridge_if_vlan_access_bd_deref(struct zebra_evpn_access_bd *bd); extern int zebra_l2_bridge_if_vlan_access_bd_ref(struct zebra_evpn_access_bd *bd); -extern void zebra_l2_brvlan_print_macs(struct vty *vty, struct interface *br_if, - vlanid_t vid, bool uj); +extern void zebra_l2_brvlan_print_macs(struct vty *vty, struct interface *br_if, vlanid_t vid, + bool uj); extern int zebra_l2_bridge_if_del(struct interface *ifp); extern int zebra_l2_bridge_if_add(struct interface *ifp); extern int zebra_l2_bridge_if_cleanup(struct interface *ifp); diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 372b27084e2f..449437fb8609 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1675,7 +1675,7 @@ DEFPY(show_nexthop_group, vty_json_no_pretty(vty, json); else vty_json(vty, json); - } + } return CMD_SUCCESS; }