diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-07-22 14:52:33 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-07-22 14:52:33 +0200 |
| commit | 9d303b37d73b8fe2bef310d8d9ca1acad23c2501 (patch) | |
| tree | bbe78c595bd8f42b76322df2a37cf81f60c08a6a /pimd/pim_cmd.c | |
| parent | dceb5f8ac71a839389786f5040a50b8feec30156 (diff) | |
Revert "*: reindent pt. 2"
This reverts commit c14777c6bfd0a446c85243d3a9835054a259c276.
clang 5 is not widely available enough for people to indent with. This
is particularly problematic when rebasing/adjusting branches.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'pimd/pim_cmd.c')
| -rw-r--r-- | pimd/pim_cmd.c | 148 |
1 files changed, 58 insertions, 90 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 07678159d0..1c9fe40c29 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -423,9 +423,8 @@ static void pim_show_membership(struct vty *vty, u_char uj) } /* scan interface channels */ if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); } else { vty_out(vty, "Interface Address Source Group Membership\n"); @@ -589,9 +588,8 @@ static void igmp_show_interfaces(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -786,9 +784,8 @@ static void igmp_show_interfaces_single(struct vty *vty, const char *ifname, } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { if (!found_ifname) @@ -1168,8 +1165,9 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, print_header = 1; for (ALL_LIST_ELEMENTS_RO(pim_upstream_list, upnode, up)) { - if (strcmp(ifp->name, up->rpf.source_nexthop - .interface->name) + if (strcmp(ifp->name, + up->rpf.source_nexthop + .interface->name) == 0) { if (up->flags & PIM_UPSTREAM_FLAG_MASK_FHR) { @@ -1256,9 +1254,8 @@ static void pim_show_interfaces_single(struct vty *vty, const char *ifname, } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { if (!found_ifname) @@ -1317,9 +1314,8 @@ static void pim_show_interfaces(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); } else { vty_out(vty, "Interface State Address PIM Nbrs PIM DR FHR IfChannels\n"); @@ -1436,9 +1432,8 @@ static void pim_show_interface_traffic(struct vty *vty, u_char uj) } } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -1523,9 +1518,8 @@ static void pim_show_interface_traffic_single(struct vty *vty, } } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { if (!found_ifname) @@ -1628,9 +1622,8 @@ static void pim_show_join(struct vty *vty, u_char uj) } /* scan interface channels */ if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -1833,9 +1826,8 @@ static void pim_show_neighbors_single(struct vty *vty, const char *neighbor, } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { { @@ -2039,9 +2031,8 @@ static void pim_show_state(struct vty *vty, const char *src_or_group, if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else { vty_out(vty, "\n"); @@ -2124,9 +2115,8 @@ static void pim_show_neighbors(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2356,9 +2346,8 @@ static void pim_show_upstream(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2442,9 +2431,8 @@ static void pim_show_join_desired(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2481,10 +2469,7 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj) pim_addr_dump("<rpf?>", &rpf->rpf_addr, rpf_addr_str, sizeof(rpf_addr_str)); - rpf_ifname = - rpf->source_nexthop.interface ? rpf->source_nexthop - .interface->name - : "<ifname?>"; + rpf_ifname = rpf->source_nexthop.interface ? rpf->source_nexthop.interface->name : "<ifname?>"; if (uj) { json_object_object_get_ex(json, grp_str, &json_group); @@ -2514,9 +2499,8 @@ static void pim_show_upstream_rpf(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2620,10 +2604,7 @@ static void pim_show_rpf(struct vty *vty, u_char uj) &rpf->source_nexthop.mrib_nexthop_addr, rib_nexthop_str, sizeof(rib_nexthop_str)); - rpf_ifname = - rpf->source_nexthop.interface ? rpf->source_nexthop - .interface->name - : "<ifname?>"; + rpf_ifname = rpf->source_nexthop.interface ? rpf->source_nexthop.interface->name : "<ifname?>"; if (uj) { json_object_object_get_ex(json, grp_str, &json_group); @@ -2661,9 +2642,8 @@ static void pim_show_rpf(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -2822,9 +2802,8 @@ static void igmp_show_groups(struct vty *vty, u_char uj) } /* scan interfaces */ if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -4060,9 +4039,8 @@ static void show_mroute(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -4655,9 +4633,8 @@ static void ip_pim_ssm_show_group_range(struct vty *vty, u_char uj) json_object *json; json = json_object_new_object(); json_object_string_add(json, "ssmGroups", range_str); - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else vty_out(vty, "SSM group range : %s\n", range_str); @@ -4699,9 +4676,8 @@ static void ip_pim_ssm_show_group_type(struct vty *vty, u_char uj, json_object *json; json = json_object_new_object(); json_object_string_add(json, "groupType", type_str); - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } else vty_out(vty, "Group type : %s\n", type_str); @@ -6453,8 +6429,7 @@ DEFUN (ip_pim_bfd_param, } ALIAS(no_ip_pim_bfd, no_ip_pim_bfd_param_cmd, - "no ip pim bfd (2-255) (50-60000) (50-60000)", - NO_STR IP_STR PIM_STR + "no ip pim bfd (2-255) (50-60000) (50-60000)", NO_STR IP_STR PIM_STR "Enables BFD support\n" "Detect Multiplier\n" "Required min receive interval\n" @@ -6815,9 +6790,8 @@ static void ip_msdp_show_mesh_group(struct vty *vty, u_char uj) if (uj) { json_object_object_add(json, mg->mesh_group_name, json_mg_row); - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -6884,9 +6858,8 @@ static void ip_msdp_show_peers(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -6990,9 +6963,8 @@ static void ip_msdp_show_peers_detail(struct vty *vty, const char *peer, } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7089,9 +7061,8 @@ static void ip_msdp_show_sa(struct vty *vty, u_char uj) if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7182,9 +7153,8 @@ static void ip_msdp_show_sa_detail(struct vty *vty, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7227,9 +7197,8 @@ static void ip_msdp_show_sa_addr(struct vty *vty, const char *addr, u_char uj) } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } @@ -7257,9 +7226,8 @@ static void ip_msdp_show_sa_sg(struct vty *vty, const char *src, } if (uj) { - vty_out(vty, "%s\n", - json_object_to_json_string_ext( - json, JSON_C_TO_STRING_PRETTY)); + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); json_object_free(json); } } |
