diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-26 00:02:37 +0200 |
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-11-27 11:20:59 +0200 |
| commit | c48349e346571d307b48ca594f6edd096be7ccfd (patch) | |
| tree | 3d465f92432dedb0f4496d4682228d36f29b2db9 /zebra/zebra_vxlan.c | |
| parent | 75eeda93231620d732be3b1d4e62e74e9ac46e14 (diff) | |
*: Remove redundand braces for single statement blocks
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'zebra/zebra_vxlan.c')
| -rw-r--r-- | zebra/zebra_vxlan.c | 63 |
1 files changed, 21 insertions, 42 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 7a85077caf..5ef7c9acea 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -2315,9 +2315,8 @@ void zebra_vxlan_print_specific_rmac_l3vni(struct vty *vty, vni_t l3vni, zl3vni_print_rmac(zrmac, vty, json); - if (use_json) { + if (use_json) vty_json(vty, json); - } } void zebra_vxlan_print_rmacs_l3vni(struct vty *vty, vni_t l3vni, bool use_json) @@ -2357,9 +2356,8 @@ void zebra_vxlan_print_rmacs_l3vni(struct vty *vty, vni_t l3vni, bool use_json) hash_iterate(zl3vni->rmac_table, zl3vni_print_rmac_hash, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } void zebra_vxlan_print_rmacs_all_l3vni(struct vty *vty, bool use_json) @@ -2383,9 +2381,8 @@ void zebra_vxlan_print_rmacs_all_l3vni(struct vty *vty, bool use_json) void *))zl3vni_print_rmac_hash_all_vni, args); - if (use_json) { + if (use_json) vty_json(vty, json); - } } void zebra_vxlan_print_specific_nh_l3vni(struct vty *vty, vni_t l3vni, @@ -2426,9 +2423,8 @@ void zebra_vxlan_print_specific_nh_l3vni(struct vty *vty, vni_t l3vni, zl3vni_print_nh(n, vty, json); - if (use_json) { + if (use_json) vty_json(vty, json); - } } void zebra_vxlan_print_nh_l3vni(struct vty *vty, vni_t l3vni, bool use_json) @@ -2468,9 +2464,8 @@ void zebra_vxlan_print_nh_l3vni(struct vty *vty, vni_t l3vni, bool use_json) hash_iterate(zl3vni->nh_table, zl3vni_print_nh_hash, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } void zebra_vxlan_print_nh_all_l3vni(struct vty *vty, bool use_json) @@ -2494,9 +2489,8 @@ void zebra_vxlan_print_nh_all_l3vni(struct vty *vty, bool use_json) void *))zl3vni_print_nh_hash_all_vni, args); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2530,9 +2524,8 @@ void zebra_vxlan_print_l3vni(struct vty *vty, vni_t vni, bool use_json) args[1] = json; zl3vni_print(zl3vni, (void *)args); - if (use_json) { + if (use_json) vty_json(vty, json); - } } void zebra_vxlan_print_vrf_vni(struct vty *vty, struct zebra_vrf *zvrf, @@ -2619,9 +2612,8 @@ void zebra_vxlan_print_neigh_vni(struct vty *vty, struct zebra_vrf *zvrf, json_object_int_add(json, "numArpNd", num_neigh); hash_iterate(zevpn->neigh_table, zebra_evpn_print_neigh_hash, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2647,9 +2639,8 @@ void zebra_vxlan_print_neigh_all_vni(struct vty *vty, struct zebra_vrf *zvrf, (void (*)(struct hash_bucket *, void *))zevpn_print_neigh_hash_all_evpn, args); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2676,9 +2667,8 @@ void zebra_vxlan_print_neigh_all_vni_detail(struct vty *vty, (void (*)(struct hash_bucket *, void *))zevpn_print_neigh_hash_all_evpn_detail, args); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2715,9 +2705,8 @@ void zebra_vxlan_print_specific_neigh_vni(struct vty *vty, zebra_evpn_print_neigh(n, vty, json); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2761,9 +2750,8 @@ void zebra_vxlan_print_neigh_vni_vtep(struct vty *vty, struct zebra_vrf *zvrf, &wctx); hash_iterate(zevpn->neigh_table, zebra_evpn_print_neigh_hash, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2825,9 +2813,8 @@ void zebra_vxlan_print_neigh_vni_dad(struct vty *vty, hash_iterate(zevpn->neigh_table, zebra_evpn_print_dad_neigh_hash, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2908,9 +2895,8 @@ void zebra_vxlan_print_macs_all_vni(struct vty *vty, struct zebra_vrf *zvrf, wctx.print_dup = print_dup; hash_iterate(zvrf->evpn_table, zevpn_print_mac_hash_all_evpn, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2938,9 +2924,8 @@ void zebra_vxlan_print_macs_all_vni_detail(struct vty *vty, hash_iterate(zvrf->evpn_table, zevpn_print_mac_hash_all_evpn_detail, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -2966,9 +2951,8 @@ void zebra_vxlan_print_macs_all_vni_vtep(struct vty *vty, wctx.json = json; hash_iterate(zvrf->evpn_table, zevpn_print_mac_hash_all_evpn, &wctx); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* @@ -3008,9 +2992,8 @@ void zebra_vxlan_print_specific_mac_vni(struct vty *vty, struct zebra_vrf *zvrf, json = json_object_new_object(); zebra_evpn_print_mac(mac, vty, json); - if (use_json) { + if (use_json) vty_json(vty, json); - } } /* Print Duplicate MACs per VNI */ @@ -3453,9 +3436,8 @@ void zebra_vxlan_print_vni(struct vty *vty, struct zebra_vrf *zvrf, vni_t vni, */ if (json_array) json_object_array_add(json_array, json); - else { + else vty_json(vty, json); - } } } @@ -3522,9 +3504,8 @@ void zebra_vxlan_print_evpn(struct vty *vty, bool uj) zebra_evpn_mh_print(vty); } - if (uj) { + if (uj) vty_json(vty, json); - } } /* @@ -3560,9 +3541,8 @@ void zebra_vxlan_print_vnis(struct vty *vty, struct zebra_vrf *zvrf, (void (*)(struct hash_bucket *, void *))zl3vni_print_hash, args); - if (use_json) { + if (use_json) vty_json(vty, json); - } } void zebra_vxlan_dup_addr_detection(ZAPI_HANDLER_ARGS) @@ -3647,9 +3627,8 @@ void zebra_vxlan_print_vnis_detail(struct vty *vty, struct zebra_vrf *zvrf, void *))zl3vni_print_hash_detail, &zes); - if (use_json) { + if (use_json) vty_json(vty, json_array); - } } /* |
