bgpd and zebra: scrubbed argc CHECK MEs

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This commit is contained in:
Daniel Walton 2016-09-29 18:21:36 +00:00
parent 67656e9b65
commit 00d7d2d345
11 changed files with 20 additions and 141 deletions

View File

@ -736,7 +736,6 @@ DEFUN (dump_bgp_all,
"Output filename\n" "Output filename\n"
"Interval of output\n") "Interval of output\n")
{ {
/* CHECK ME argc referenced below */
int idx_dump_routes = 2; int idx_dump_routes = 2;
int idx_path = 3; int idx_path = 3;
int idx_interval = 4; int idx_interval = 4;
@ -766,7 +765,7 @@ DEFUN (dump_bgp_all,
} }
/* When an interval is given */ /* When an interval is given */
if (argc == 3) if (argc == idx_interval + 1)
interval = argv[idx_interval]->arg; interval = argv[idx_interval]->arg;
return bgp_dump_set (vty, bgp_dump_struct, bgp_dump_type, return bgp_dump_set (vty, bgp_dump_struct, bgp_dump_type,

View File

@ -924,7 +924,6 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_routes,
"Display routes learned from neighbor\n" "Display routes learned from neighbor\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 6; int idx_ipv4 = 6;
union sockunion su; union sockunion su;
struct peer *peer; struct peer *peer;
@ -980,7 +979,6 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_routes,
"Display routes learned from neighbor\n" "Display routes learned from neighbor\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_ext_community = 5; int idx_ext_community = 5;
int idx_ipv4 = 7; int idx_ipv4 = 7;
int ret; int ret;
@ -1053,7 +1051,6 @@ DEFUN (show_ip_bgp_vpnv4_all_neighbor_advertised_routes,
"Display the routes advertised to a BGP neighbor\n" "Display the routes advertised to a BGP neighbor\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 6; int idx_ipv4 = 6;
int ret; int ret;
struct peer *peer; struct peer *peer;
@ -1108,7 +1105,6 @@ DEFUN (show_ip_bgp_vpnv4_rd_neighbor_advertised_routes,
"Display the routes advertised to a BGP neighbor\n" "Display the routes advertised to a BGP neighbor\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_ext_community = 5; int idx_ext_community = 5;
int idx_ipv4 = 7; int idx_ipv4 = 7;
int ret; int ret;

View File

@ -7772,7 +7772,6 @@ DEFUN (show_ip_bgp_ipv4,
"Display route and more specific routes\n" "Display route and more specific routes\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_afi; int idx_afi;
@ -7880,7 +7879,6 @@ DEFUN (show_ip_bgp_route,
"Display only multipaths\n" "Display only multipaths\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_afi; int idx_afi;
@ -7932,7 +7930,6 @@ DEFUN (show_ip_bgp_instance_all,
BGP_INSTANCE_ALL_HELP_STR BGP_INSTANCE_ALL_HELP_STR
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
/* CHECK ME we need to revisit all of the bgp_show_all_ commands */ /* CHECK ME we need to revisit all of the bgp_show_all_ commands */
@ -7948,7 +7945,6 @@ DEFUN (show_bgp_instance_all,
BGP_INSTANCE_ALL_HELP_STR BGP_INSTANCE_ALL_HELP_STR
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
bgp_show_all_instances_routes_vty (vty, AFI_IP6, SAFI_UNICAST, uj); bgp_show_all_instances_routes_vty (vty, AFI_IP6, SAFI_UNICAST, uj);
@ -8865,7 +8861,6 @@ DEFUN (show_ip_bgp_neighbor_prefix_counts,
"Display detailed prefix count information\n" "Display detailed prefix count information\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_peer = 4; int idx_peer = 4;
struct peer *peer; struct peer *peer;
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
@ -8891,7 +8886,6 @@ DEFUN (show_ip_bgp_instance_neighbor_prefix_counts,
"Display detailed prefix count information\n" "Display detailed prefix count information\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 4; int idx_word = 4;
int idx_peer = 6; int idx_peer = 6;
struct peer *peer; struct peer *peer;
@ -8917,7 +8911,6 @@ DEFUN (show_bgp_ipv6_neighbor_prefix_counts,
"Display detailed prefix count information\n" "Display detailed prefix count information\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_peer = 4; int idx_peer = 4;
struct peer *peer; struct peer *peer;
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
@ -8943,7 +8936,6 @@ DEFUN (show_bgp_instance_ipv6_neighbor_prefix_counts,
"Display detailed prefix count information\n" "Display detailed prefix count information\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 3; int idx_word = 3;
int idx_peer = 6; int idx_peer = 6;
struct peer *peer; struct peer *peer;
@ -8972,7 +8964,6 @@ DEFUN (show_ip_bgp_ipv4_neighbor_prefix_counts,
"Display detailed prefix count information\n" "Display detailed prefix count information\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_safi = 4; int idx_safi = 4;
int idx_peer = 6; int idx_peer = 6;
struct peer *peer; struct peer *peer;
@ -9004,7 +8995,6 @@ DEFUN (show_ip_bgp_vpnv4_neighbor_prefix_counts,
"Display detailed prefix count information\n" "Display detailed prefix count information\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_peer = 6; int idx_peer = 6;
struct peer *peer; struct peer *peer;
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
@ -9281,7 +9271,6 @@ DEFUN (show_ip_bgp_instance_neighbor_advertised_route,
"Name of the route map\n" "Name of the route map\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_afi = 5; int idx_afi = 5;
@ -9344,7 +9333,6 @@ DEFUN (show_ip_bgp_neighbor_received_prefix_filter,
"Display the prefixlist filter\n" "Display the prefixlist filter\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_afi; int idx_afi;
@ -9454,7 +9442,6 @@ DEFUN (show_ip_bgp_neighbor_routes,
"Display flap statistics of the routes learned from neighbor\n" "Display flap statistics of the routes learned from neighbor\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_afi; int idx_afi;
@ -9792,7 +9779,6 @@ DEFUN (bgp_damp_set,
"Value to start suppressing a route\n" "Value to start suppressing a route\n"
"Maximum duration to suppress a stable route\n") "Maximum duration to suppress a stable route\n")
{ {
/* CHECK ME argc referenced below */
int idx_half_life = 2; int idx_half_life = 2;
int idx_reuse = 3; int idx_reuse = 3;
int idx_suppress = 4; int idx_suppress = 4;

View File

@ -3026,7 +3026,6 @@ DEFUN (no_match_peer,
"IP address of peer\n" "IP address of peer\n"
"IPv6 address of peer\n") "IPv6 address of peer\n")
{ {
/* CHECK ME argc referenced below */
int idx_peer = 3; int idx_peer = 3;
if (argc <= idx_peer) if (argc <= idx_peer)
@ -3065,7 +3064,6 @@ DEFUN (no_match_ip_address,
"IP access-list number (expanded range)\n" "IP access-list number (expanded range)\n"
"IP Access-list name\n") "IP Access-list name\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 4; int idx_word = 4;
if (argc <= idx_word) if (argc <= idx_word)
return bgp_route_match_delete (vty, vty->index, "ip address", NULL, return bgp_route_match_delete (vty, vty->index, "ip address", NULL,
@ -3102,7 +3100,6 @@ DEFUN (no_match_ip_next_hop,
"IP access-list number (expanded range)\n" "IP access-list number (expanded range)\n"
"IP Access-list name\n") "IP Access-list name\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 4; int idx_word = 4;
if (argc <= idx_word) if (argc <= idx_word)
return bgp_route_match_delete (vty, vty->index, "ip next-hop", NULL, return bgp_route_match_delete (vty, vty->index, "ip next-hop", NULL,
@ -3134,7 +3131,6 @@ DEFUN (no_match_probability,
"Match portion of routes defined by percentage value\n" "Match portion of routes defined by percentage value\n"
"Percentage of routes\n") "Percentage of routes\n")
{ {
/* CHECK ME argc referenced below */
int idx_number = 3; int idx_number = 3;
if (argc <= idx_number) if (argc <= idx_number)
return bgp_route_match_delete (vty, vty->index, "probability", NULL, return bgp_route_match_delete (vty, vty->index, "probability", NULL,
@ -3171,7 +3167,6 @@ DEFUN (no_match_ip_route_source,
"IP access-list number (expanded range)\n" "IP access-list number (expanded range)\n"
"IP standard access-list name\n") "IP standard access-list name\n")
{ {
/* CHECK ME argc referenced below */
int idx_number = 4; int idx_number = 4;
if (argc <= idx_number) if (argc <= idx_number)
return bgp_route_match_delete (vty, vty->index, "ip route-source", return bgp_route_match_delete (vty, vty->index, "ip route-source",
@ -3206,7 +3201,6 @@ DEFUN (no_match_ip_address_prefix_list,
"Match entries of prefix-lists\n" "Match entries of prefix-lists\n"
"IP prefix-list name\n") "IP prefix-list name\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 5; int idx_word = 5;
if (argc <= idx_word) if (argc <= idx_word)
return bgp_route_match_delete (vty, vty->index, "ip address prefix-list", return bgp_route_match_delete (vty, vty->index, "ip address prefix-list",
@ -3240,7 +3234,6 @@ DEFUN (no_match_ip_next_hop_prefix_list,
"Match entries of prefix-lists\n" "Match entries of prefix-lists\n"
"IP prefix-list name\n") "IP prefix-list name\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 5; int idx_word = 5;
if (argc <= idx_word) if (argc <= idx_word)
return bgp_route_match_delete (vty, vty->index, "ip next-hop prefix-list", return bgp_route_match_delete (vty, vty->index, "ip next-hop prefix-list",
@ -3275,7 +3268,6 @@ DEFUN (no_match_ip_route_source_prefix_list,
"Match entries of prefix-lists\n" "Match entries of prefix-lists\n"
"IP prefix-list name\n") "IP prefix-list name\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 5; int idx_word = 5;
if (argc <= idx_word) if (argc <= idx_word)
return bgp_route_match_delete (vty, vty->index, "ip route-source prefix-list", return bgp_route_match_delete (vty, vty->index, "ip route-source prefix-list",
@ -3306,7 +3298,6 @@ DEFUN (no_match_metric,
"Match metric of route\n" "Match metric of route\n"
"Metric value\n") "Metric value\n")
{ {
/* CHECK ME argc referenced below */
int idx_number = 3; int idx_number = 3;
if (argc <= idx_number) if (argc <= idx_number)
return bgp_route_match_delete (vty, vty->index, "metric", return bgp_route_match_delete (vty, vty->index, "metric",
@ -3338,7 +3329,6 @@ DEFUN (no_match_local_pref,
"Match local preference of route\n" "Match local preference of route\n"
"Local preference value\n") "Local preference value\n")
{ {
/* CHECK ME argc referenced below */
int idx_localpref = 3; int idx_localpref = 3;
if (argc <= idx_localpref) if (argc <= idx_localpref)
return bgp_route_match_delete (vty, vty->index, "local-preference", return bgp_route_match_delete (vty, vty->index, "local-preference",
@ -3615,7 +3605,6 @@ DEFUN (no_set_ip_nexthop,
"Use peer address (for BGP only)\n" "Use peer address (for BGP only)\n"
"IP address of next hop\n") "IP address of next hop\n")
{ {
/* CHECK ME argc referenced below */
int idx_peer = 4; int idx_peer = 4;
if (argc <= idx_peer) if (argc <= idx_peer)
return bgp_route_set_delete (vty, vty->index, "ip next-hop", NULL); return bgp_route_set_delete (vty, vty->index, "ip next-hop", NULL);
@ -3659,7 +3648,6 @@ DEFUN (no_set_metric,
"Metric value for destination routing protocol\n" "Metric value for destination routing protocol\n"
"Metric value\n") "Metric value\n")
{ {
/* CHECK ME argc referenced below */
int idx_number = 3; int idx_number = 3;
if (argc <= idx_number) if (argc <= idx_number)
return bgp_route_set_delete (vty, vty->index, "metric", NULL); return bgp_route_set_delete (vty, vty->index, "metric", NULL);
@ -3687,7 +3675,6 @@ DEFUN (no_set_local_pref,
"BGP local preference path attribute\n" "BGP local preference path attribute\n"
"Preference value\n") "Preference value\n")
{ {
/* CHECK ME argc referenced below */
int idx_localpref = 3; int idx_localpref = 3;
if (argc <= idx_localpref) if (argc <= idx_localpref)
return bgp_route_set_delete (vty, vty->index, "local-preference", NULL); return bgp_route_set_delete (vty, vty->index, "local-preference", NULL);
@ -3715,7 +3702,6 @@ DEFUN (no_set_weight,
"BGP weight for routing table\n" "BGP weight for routing table\n"
"Weight value\n") "Weight value\n")
{ {
/* CHECK ME argc referenced below */
int idx_weight = 3; int idx_weight = 3;
if (argc <= idx_weight) if (argc <= idx_weight)
return bgp_route_set_delete (vty, vty->index, "weight", NULL); return bgp_route_set_delete (vty, vty->index, "weight", NULL);
@ -4111,7 +4097,6 @@ DEFUN (no_set_aggregator_as,
"AS number\n" "AS number\n"
"IP address of aggregator\n") "IP address of aggregator\n")
{ {
/* CHECK ME argc referenced below */
int idx_asn = 4; int idx_asn = 4;
int idx_ip = 5; int idx_ip = 5;
int ret; int ret;
@ -4161,7 +4146,6 @@ DEFUN (no_set_tag,
"Tag value for routing protocol\n" "Tag value for routing protocol\n"
"Tag value\n") "Tag value\n")
{ {
/* CHECK ME argc referenced below */
int idx_number = 3; int idx_number = 3;
if (argc <= idx_number) if (argc <= idx_number)
return bgp_route_set_delete (vty, vty->index, "tag", NULL); return bgp_route_set_delete (vty, vty->index, "tag", NULL);
@ -4342,7 +4326,6 @@ DEFUN (no_set_ipv6_nexthop_global,
"IPv6 global address\n" "IPv6 global address\n"
"IPv6 address of next hop\n") "IPv6 address of next hop\n")
{ {
/* CHECK ME argc referenced below */
int idx_ipv6 = 5; int idx_ipv6 = 5;
if (argc <= idx_ipv6) if (argc <= idx_ipv6)
return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", NULL); return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop global", NULL);
@ -4389,7 +4372,6 @@ DEFUN (no_set_ipv6_nexthop_local,
"IPv6 local address\n" "IPv6 local address\n"
"IPv6 address of next hop\n") "IPv6 address of next hop\n")
{ {
/* CHECK ME argc referenced below */
int idx_ipv6 = 5; int idx_ipv6 = 5;
if (argc <= idx_ipv6) if (argc <= idx_ipv6)
return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL); return bgp_route_set_delete (vty, vty->index, "ipv6 next-hop local", NULL);
@ -4420,7 +4402,6 @@ DEFUN (no_set_vpnv4_nexthop,
"VPNv4 next-hop address\n" "VPNv4 next-hop address\n"
"IP address of next hop\n") "IP address of next hop\n")
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 4; int idx_ipv4 = 4;
if (argc <= idx_ipv4) if (argc <= idx_ipv4)
return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", NULL); return bgp_route_set_delete (vty, vty->index, "vpnv4 next-hop", NULL);
@ -4448,7 +4429,6 @@ DEFUN (no_set_originator_id,
"BGP originator ID attribute\n" "BGP originator ID attribute\n"
"IP address of originator\n") "IP address of originator\n")
{ {
/* CHECK ME argc referenced below */
int idx_id = 3; int idx_id = 3;
if (argc < idx_id) if (argc < idx_id)
return bgp_route_set_delete (vty, vty->index, "originator-id", NULL); return bgp_route_set_delete (vty, vty->index, "originator-id", NULL);

View File

@ -664,7 +664,6 @@ DEFUN (router_bgp,
AS_STR AS_STR
BGP_INSTANCE_HELP_STR) BGP_INSTANCE_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_asn = 2; int idx_asn = 2;
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
@ -745,7 +744,6 @@ DEFUN (no_router_bgp,
AS_STR AS_STR
BGP_INSTANCE_HELP_STR) BGP_INSTANCE_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_asn = 3; int idx_asn = 3;
int idx_vrf = 5; int idx_vrf = 5;
as_t as; as_t as;
@ -829,7 +827,6 @@ DEFUN (no_bgp_router_id,
"Override configured router identifier\n" "Override configured router identifier\n"
"Manually configured router identifier\n") "Manually configured router identifier\n")
{ {
/* CHECK ME argc referenced below */
int idx_router_id = 3; int idx_router_id = 3;
int ret; int ret;
struct in_addr id; struct in_addr id;
@ -1111,21 +1108,12 @@ DEFUN (bgp_maxmed_onstartup,
"Effective on a startup\n" "Effective on a startup\n"
"Time (seconds) period for max-med\n") "Time (seconds) period for max-med\n")
{ {
/* CHECK ME argc referenced below */
int idx_number = 3; int idx_number = 3;
struct bgp *bgp; struct bgp *bgp;
bgp = vty->index; bgp = vty->index;
if (argc != 1)
{
vty_out (vty, "%% Must supply max-med on-startup period");
return CMD_WARNING;
}
VTY_GET_INTEGER ("max-med on-startup period", bgp->v_maxmed_onstartup, argv[idx_number]->arg); VTY_GET_INTEGER ("max-med on-startup period", bgp->v_maxmed_onstartup, argv[idx_number]->arg);
bgp->maxmed_onstartup_value = BGP_MAXMED_VALUE_DEFAULT; bgp->maxmed_onstartup_value = BGP_MAXMED_VALUE_DEFAULT;
bgp_maxmed_update(bgp); bgp_maxmed_update(bgp);
return CMD_SUCCESS; return CMD_SUCCESS;
@ -1140,22 +1128,13 @@ DEFUN (bgp_maxmed_onstartup_medv,
"Time (seconds) period for max-med\n" "Time (seconds) period for max-med\n"
"Max MED value to be used\n") "Max MED value to be used\n")
{ {
/* CHECK ME argc referenced below */
int idx_number = 3; int idx_number = 3;
int idx_number_2 = 4; int idx_number_2 = 4;
struct bgp *bgp; struct bgp *bgp;
bgp = vty->index; bgp = vty->index;
if (argc != 2)
{
vty_out (vty, "%% Must supply max-med on-startup period and med value");
return CMD_WARNING;
}
VTY_GET_INTEGER ("max-med on-startup period", bgp->v_maxmed_onstartup, argv[idx_number]->arg); VTY_GET_INTEGER ("max-med on-startup period", bgp->v_maxmed_onstartup, argv[idx_number]->arg);
VTY_GET_INTEGER ("max-med on-startup med-value", bgp->maxmed_onstartup_value, argv[idx_number_2]->arg); VTY_GET_INTEGER ("max-med on-startup med-value", bgp->maxmed_onstartup_value, argv[idx_number_2]->arg);
bgp_maxmed_update(bgp); bgp_maxmed_update(bgp);
return CMD_SUCCESS; return CMD_SUCCESS;
@ -2785,7 +2764,6 @@ DEFUN (neighbor_interface_config,
"Member of the peer-group\n" "Member of the peer-group\n"
"peer-group name\n") "peer-group name\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 1; int idx_word = 1;
int idx_peer_group_word = 4; int idx_peer_group_word = 4;
@ -2807,7 +2785,6 @@ DEFUN (neighbor_interface_config_v6only,
"Member of the peer-group\n" "Member of the peer-group\n"
"peer-group name\n") "peer-group name\n")
{ {
/* CHECK ME argc referenced below */
int idx_word = 1; int idx_word = 1;
int idx_peer_group_word = 5; int idx_peer_group_word = 5;
@ -4934,13 +4911,9 @@ DEFUN (neighbor_interface,
"Interface\n" "Interface\n"
"Interface name\n") "Interface name\n")
{ {
/* CHECK ME argc referenced below */
int idx_ip = 1; int idx_ip = 1;
int idx_word = 3; int idx_word = 3;
if (argc == 3) return peer_interface_vty (vty, argv[idx_ip]->arg, argv[idx_word]->arg);
return peer_interface_vty (vty, argv[idx_ip]->arg, argv[idx_word]->arg);
else
return peer_interface_vty (vty, argv[idx_ip]->arg, argv[idx_word]->arg);
} }
DEFUN (no_neighbor_interface, DEFUN (no_neighbor_interface,
@ -5530,7 +5503,6 @@ DEFUN (neighbor_allowas_in,
"Accept as-path with my AS present in it\n" "Accept as-path with my AS present in it\n"
"Number of occurances of AS number\n") "Number of occurances of AS number\n")
{ {
/* CHECK ME argc referenced below */
int idx_peer = 1; int idx_peer = 1;
int idx_number = 3; int idx_number = 3;
int ret; int ret;
@ -6024,7 +5996,6 @@ DEFUN (clear_ip_bgp_all,
BGP_SOFT_IN_STR BGP_SOFT_IN_STR
BGP_SOFT_OUT_STR) BGP_SOFT_OUT_STR)
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_clr_sort = 5; int idx_clr_sort = 5;
@ -6218,7 +6189,6 @@ DEFUN (show_bgp_vrfs,
"Show BGP VRFs\n" "Show BGP VRFs\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
struct list *inst = bm->bgp; struct list *inst = bm->bgp;
struct listnode *node; struct listnode *node;
struct bgp *bgp; struct bgp *bgp;
@ -6874,7 +6844,6 @@ DEFUN (show_ip_bgp_summary,
"Summary of BGP neighbor status\n" "Summary of BGP neighbor status\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_afi; int idx_afi;
@ -6901,7 +6870,6 @@ DEFUN (show_ip_bgp_instance_all_summary,
"Summary of BGP neighbor status\n" "Summary of BGP neighbor status\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
bgp_show_all_instances_summary_vty (vty, AFI_IP, SAFI_UNICAST, uj); bgp_show_all_instances_summary_vty (vty, AFI_IP, SAFI_UNICAST, uj);
@ -8753,7 +8721,6 @@ DEFUN (show_ip_bgp_neighbors,
"Neighbor on bgp configured interface\n" "Neighbor on bgp configured interface\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
int idx_ip = 1; int idx_ip = 1;
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
@ -8801,7 +8768,6 @@ DEFUN (show_ip_bgp_instance_all_neighbors,
"Detailed information on TCP and BGP neighbor connections\n" "Detailed information on TCP and BGP neighbor connections\n"
"JavaScript Object Notation\n") "JavaScript Object Notation\n")
{ {
/* CHECK ME argc referenced below */
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
bgp_show_all_instances_neighbors_vty (vty, uj); bgp_show_all_instances_neighbors_vty (vty, uj);
@ -8936,7 +8902,6 @@ DEFUN (show_ip_bgp_updgrps,
"Detailed info about dynamic update groups\n" "Detailed info about dynamic update groups\n"
"Specific subgroup to display detailed info for\n") "Specific subgroup to display detailed info for\n")
{ {
/* CHECK ME argc referenced below */
int idx_view_vrf = 3; int idx_view_vrf = 3;
int idx_vrf = 4; int idx_vrf = 4;
int idx_afi; int idx_afi;
@ -11321,7 +11286,6 @@ DEFUN (ip_community_list_standard,
"Specify community to accept\n" "Specify community to accept\n"
COMMUNITY_VAL_STR) COMMUNITY_VAL_STR)
{ {
/* CHECK ME argc referenced below */
return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD);
} }
@ -11338,7 +11302,6 @@ DEFUN (no_ip_community_list_standard_all,
"Specify community to accept\n" "Specify community to accept\n"
COMMUNITY_VAL_STR) COMMUNITY_VAL_STR)
{ {
/* CHECK ME argc referenced below */
return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD); return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_STANDARD);
} }
@ -11355,7 +11318,6 @@ DEFUN (ip_community_list_expanded_all,
"Specify community to accept\n" "Specify community to accept\n"
COMMUNITY_VAL_STR) COMMUNITY_VAL_STR)
{ {
/* CHECK ME argc referenced below */
return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); return community_list_set_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED);
} }
@ -11372,7 +11334,6 @@ DEFUN (no_ip_community_list_expanded_all,
"Specify community to accept\n" "Specify community to accept\n"
COMMUNITY_VAL_STR) COMMUNITY_VAL_STR)
{ {
/* CHECK ME argc referenced below */
return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED); return community_list_unset_vty (vty, argc, argv, COMMUNITY_LIST_EXPANDED);
} }
@ -11564,7 +11525,6 @@ DEFUN (ip_extcommunity_list_standard,
"Specify community to accept\n" "Specify community to accept\n"
EXTCOMMUNITY_VAL_STR) EXTCOMMUNITY_VAL_STR)
{ {
/* CHECK ME argc referenced below */
return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD); return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_STANDARD);
} }
@ -11580,7 +11540,6 @@ DEFUN (ip_extcommunity_list_name_expanded,
"Specify community to accept\n" "Specify community to accept\n"
"An ordered list as a regular-expression\n") "An ordered list as a regular-expression\n")
{ {
/* CHECK ME argc referenced below */
return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); return extcommunity_list_set_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED);
} }
@ -11597,7 +11556,6 @@ DEFUN (no_ip_extcommunity_list_standard_all,
"Specify community to accept\n" "Specify community to accept\n"
EXTCOMMUNITY_VAL_STR) EXTCOMMUNITY_VAL_STR)
{ {
/* CHECK ME argc referenced below */
return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED);
} }
@ -11614,7 +11572,6 @@ DEFUN (no_ip_extcommunity_list_expanded_all,
"Specify community to accept\n" "Specify community to accept\n"
"An ordered list as a regular-expression\n") "An ordered list as a regular-expression\n")
{ {
/* CHECK ME argc referenced below */
return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED); return extcommunity_list_unset_vty (vty, argc, argv, EXTCOMMUNITY_LIST_EXPANDED);
} }

View File

@ -726,6 +726,18 @@ DEFUN (no_bgp_maxmed_onstartup,
if 'use_json (argc, argv)' in line: if 'use_json (argc, argv)' in line:
continue continue
if 'use_json(argc, argv)' in line:
continue
if 'bgp_get_argv_vrf (argc,)' in line:
continue
if 'bgp_get_argv_afi_safi (argc,' in line:
continue
if 'zebra_vty_ip_route_tdv_helper (argc,' in line:
continue
if 'argc' in line: if 'argc' in line:
return True return True
return False return False
@ -742,8 +754,9 @@ DEFUN (no_bgp_maxmed_onstartup,
lines.extend(self.help_strings) lines.extend(self.help_strings)
lines.append('{\n') lines.append('{\n')
if self.uses_argc(): # uncomment this to do ospf_vty.c
lines.append(" /* CHECK ME argc referenced below */\n") # if self.uses_argc():
# lines.append(" /* CHECK ME argc referenced below */\n")
lines.extend(self.guts) lines.extend(self.guts)
''' '''

View File

@ -1305,7 +1305,6 @@ DEFUN (show_interface,
"Interface status and configuration\n" "Interface status and configuration\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
struct listnode *node; struct listnode *node;
struct interface *ifp; struct interface *ifp;
vrf_id_t vrf_id = VRF_DEFAULT; vrf_id_t vrf_id = VRF_DEFAULT;
@ -1355,7 +1354,6 @@ DEFUN (show_interface_name_vrf,
"Interface name\n" "Interface name\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ifname = 2; int idx_ifname = 2;
int idx_name = 4; int idx_name = 4;
struct interface *ifp; struct interface *ifp;
@ -1363,8 +1361,7 @@ DEFUN (show_interface_name_vrf,
interface_update_stats (); interface_update_stats ();
if (argc > 1) VRF_GET_ID (vrf_id, argv[idx_name]->arg);
VRF_GET_ID (vrf_id, argv[idx_name]->arg);
/* Specified interface print. */ /* Specified interface print. */
ifp = if_lookup_by_name_vrf (argv[idx_ifname]->arg, vrf_id); ifp = if_lookup_by_name_vrf (argv[idx_ifname]->arg, vrf_id);
@ -1465,7 +1462,6 @@ DEFUN (show_interface_desc,
"Interface description\n" "Interface description\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
vrf_id_t vrf_id = VRF_DEFAULT; vrf_id_t vrf_id = VRF_DEFAULT;
if (argc > 3) if (argc > 3)
@ -2083,7 +2079,6 @@ DEFUN (link_params_delay,
"Maximum delay\n" "Maximum delay\n"
"Maximum delay in micro-second as decimal (0...16777215)\n") "Maximum delay in micro-second as decimal (0...16777215)\n")
{ {
/* CHECK ME argc referenced below */
/* Get and Check new delay values */ /* Get and Check new delay values */
u_int32_t delay = 0, low = 0, high = 0; u_int32_t delay = 0, low = 0, high = 0;
VTY_GET_ULONG("delay", delay, argv[1]->arg); VTY_GET_ULONG("delay", delay, argv[1]->arg);

View File

@ -221,7 +221,6 @@ DEFUN (router_id,
"IP address to use for router-id\n" "IP address to use for router-id\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 1; int idx_ipv4 = 1;
int idx_name = 3; int idx_name = 3;
@ -251,7 +250,6 @@ DEFUN (no_router_id,
"IP address to use for router-id\n" "IP address to use for router-id\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_name = 4; int idx_name = 4;
struct prefix rid; struct prefix rid;

View File

@ -124,11 +124,8 @@ DEFUN (test_interface_state,
"up\n" "up\n"
"down\n") "down\n")
{ {
/* CHECK ME argc referenced below */
int idx_up_down = 1; int idx_up_down = 1;
struct interface *ifp; struct interface *ifp;
if (argc < 1)
return CMD_WARNING;
ifp = vty->index; ifp = vty->index;
if (ifp->ifindex == IFINDEX_INTERNAL) if (ifp->ifindex == IFINDEX_INTERNAL)

View File

@ -314,7 +314,6 @@ DEFUN (no_match_interface,
"Match first hop interface of route\n" "Match first hop interface of route\n"
"Interface name\n") "Interface name\n")
{ {
/* CHECK ME argc referenced below */
char *iface = (argc == 4) ? argv[3]->arg : NULL; char *iface = (argc == 4) ? argv[3]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, "interface", iface, RMAP_EVENT_MATCH_DELETED);
} }
@ -339,7 +338,6 @@ DEFUN (no_match_tag,
MATCH_STR MATCH_STR
"Match tag of route\n") "Match tag of route\n")
{ {
/* CHECK ME argc referenced below */
char *tag = (argc == 4) ? argv[3]->arg : NULL; char *tag = (argc == 4) ? argv[3]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, "tag", tag, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, "tag", tag, RMAP_EVENT_MATCH_DELETED);
} }
@ -370,7 +368,6 @@ DEFUN (no_match_ip_next_hop,
"IP access-list number (expanded range)\n" "IP access-list number (expanded range)\n"
"IP Access-list name\n") "IP Access-list name\n")
{ {
/* CHECK ME argc referenced below */
char *al = (argc == 5) ? argv[4]->arg : NULL; char *al = (argc == 5) ? argv[4]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, "ip next-hop", al, RMAP_EVENT_FILTER_DELETED); return zebra_route_match_delete (vty, vty->index, "ip next-hop", al, RMAP_EVENT_FILTER_DELETED);
} }
@ -400,7 +397,6 @@ DEFUN (no_match_ip_next_hop_prefix_list,
"Match entries of prefix-lists\n" "Match entries of prefix-lists\n"
"IP prefix-list name\n") "IP prefix-list name\n")
{ {
/* CHECK ME argc referenced below */
char *plist = (argc == 6) ? argv[5]->arg : NULL; char *plist = (argc == 6) ? argv[5]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, return zebra_route_match_delete (vty, vty->index,
"ip next-hop prefix-list", plist, "ip next-hop prefix-list", plist,
@ -435,7 +431,6 @@ DEFUN (no_match_ip_address,
"IP access-list number (expanded range)\n" "IP access-list number (expanded range)\n"
"IP Access-list name\n") "IP Access-list name\n")
{ {
/* CHECK ME argc referenced below */
char *al = (argc == 5) ? argv[4]->arg : NULL; char *al = (argc == 5) ? argv[4]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, "ip address", al, RMAP_EVENT_FILTER_DELETED); return zebra_route_match_delete (vty, vty->index, "ip address", al, RMAP_EVENT_FILTER_DELETED);
} }
@ -465,7 +460,6 @@ DEFUN (no_match_ip_address_prefix_list,
"Match entries of prefix-lists\n" "Match entries of prefix-lists\n"
"IP prefix-list name\n") "IP prefix-list name\n")
{ {
/* CHECK ME argc referenced below */
char *plist = (argc == 6) ? argv[5]->arg : NULL; char *plist = (argc == 6) ? argv[5]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, return zebra_route_match_delete (vty, vty->index,
"ip address prefix-list", plist, "ip address prefix-list", plist,
@ -495,7 +489,6 @@ DEFUN (no_match_ip_address_prefix_len,
"Match prefixlen of ip address of route\n" "Match prefixlen of ip address of route\n"
"Prefix length\n") "Prefix length\n")
{ {
/* CHECK ME argc referenced below */
char *plen = (argc == 6) ? argv[5]->arg : NULL; char *plen = (argc == 6) ? argv[5]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, return zebra_route_match_delete (vty, vty->index,
"ip address prefix-len", plen, "ip address prefix-len", plen,
@ -526,7 +519,6 @@ DEFUN (no_match_ip_nexthop_prefix_len,
"Match prefix length of nexthop\n" "Match prefix length of nexthop\n"
"Prefix length\n") "Prefix length\n")
{ {
/* CHECK ME argc referenced below */
char *plen = (argc == 6) ? argv[5]->arg : NULL; char *plen = (argc == 6) ? argv[5]->arg : NULL;
return zebra_route_match_delete (vty, vty->index, return zebra_route_match_delete (vty, vty->index,
"ip next-hop prefix-len", plen, "ip next-hop prefix-len", plen,
@ -560,7 +552,6 @@ DEFUN (no_match_source_protocol,
"No match protocol via which the route was learnt\n" "No match protocol via which the route was learnt\n"
) )
{ {
/* CHECK ME argc referenced below */
char *proto = (argc == 4) ? argv[3]->text : NULL; char *proto = (argc == 4) ? argv[3]->text : NULL;
return zebra_route_match_delete (vty, vty->index, "source-protocol", proto, RMAP_EVENT_MATCH_DELETED); return zebra_route_match_delete (vty, vty->index, "source-protocol", proto, RMAP_EVENT_MATCH_DELETED);
} }
@ -634,7 +625,6 @@ DEFUN (no_set_src,
SET_STR SET_STR
"Source address for route\n") "Source address for route\n")
{ {
/* CHECK ME argc referenced below */
char *ip = (argc == 4) ? argv[3]->arg : NULL; char *ip = (argc == 4) ? argv[3]->arg : NULL;
return zebra_route_set_delete (vty, vty->index, "src", ip); return zebra_route_set_delete (vty, vty->index, "src", ip);
} }
@ -718,7 +708,6 @@ DEFUN (no_ip_protocol,
"Specify route map\n" "Specify route map\n"
"Route map name\n") "Route map name\n")
{ {
/* CHECK ME argc referenced below */
char *proto = argv[3]->text; char *proto = argv[3]->text;
char *rmap = (argc == 6) ? argv[5]->arg : NULL; char *rmap = (argc == 6) ? argv[5]->arg : NULL;
int i; int i;
@ -829,7 +818,6 @@ DEFUN (no_ipv6_protocol,
"Specify route map\n" "Specify route map\n"
"Route map name\n") "Route map name\n")
{ {
/* CHECK ME argc referenced below */
const char *proto = argv[3]->text; const char *proto = argv[3]->text;
const char *rmap = (argc == 6) ? argv[5]->arg : NULL; const char *rmap = (argc == 6) ? argv[5]->arg : NULL;
int i; int i;
@ -936,7 +924,6 @@ DEFUN (no_ip_protocol_nht_rmap,
"Specify route map\n" "Specify route map\n"
"Route map name\n") "Route map name\n")
{ {
/* CHECK ME argc referenced below */
char *proto = argv[3]->text; char *proto = argv[3]->text;
char *rmap = (argc == 6) ? argv[5]->arg : NULL; char *rmap = (argc == 6) ? argv[5]->arg : NULL;
int i; int i;
@ -1032,7 +1019,6 @@ DEFUN (no_ipv6_protocol_nht_rmap,
"Specify route map\n" "Specify route map\n"
"Route map name\n") "Route map name\n")
{ {
/* CHECK ME argc referenced below */
char *proto = argv[3]->text; char *proto = argv[3]->text;
char *rmap = (argc == 6) ? argv[5]->arg : NULL; char *rmap = (argc == 6) ? argv[5]->arg : NULL;
int i; int i;

View File

@ -191,7 +191,6 @@ DEFUN (ip_mroute_dist,
"Nexthop interface name\n" "Nexthop interface name\n"
"Distance\n") "Distance\n")
{ {
/* CHECK ME argc referenced below */
char *destprefix = argv[2]->arg; char *destprefix = argv[2]->arg;
char *nexthop = argv[3]->arg; char *nexthop = argv[3]->arg;
char *distance = (argc == 5) ? argv[4]->arg : NULL; char *distance = (argc == 5) ? argv[4]->arg : NULL;
@ -209,7 +208,6 @@ DEFUN (no_ip_mroute_dist,
"Nexthop interface name\n" "Nexthop interface name\n"
"Distance\n") "Distance\n")
{ {
/* CHECK ME argc referenced below */
char *destprefix = argv[2]->arg; char *destprefix = argv[2]->arg;
char *nexthop = argv[3]->arg; char *nexthop = argv[3]->arg;
char *distance = (argc == 5) ? argv[4]->arg : NULL; char *distance = (argc == 5) ? argv[4]->arg : NULL;
@ -353,7 +351,6 @@ DEFUN (ip_route,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4_prefixlen = 2; int idx_ipv4_prefixlen = 2;
int idx_ipv4_ifname_null = 3; int idx_ipv4_ifname_null = 3;
int idx_curr = 4; int idx_curr = 4;
@ -385,7 +382,6 @@ DEFUN (ip_route_flags,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4_prefixlen = 2; int idx_ipv4_prefixlen = 2;
int idx_ipv4_ifname = 3; int idx_ipv4_ifname = 3;
int idx_reject_blackhole = 4; int idx_reject_blackhole = 4;
@ -416,7 +412,6 @@ DEFUN (ip_route_flags2,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4_prefixlen = 2; int idx_ipv4_prefixlen = 2;
int idx_reject_blackhole = 3; int idx_reject_blackhole = 3;
int idx_curr = 4; int idx_curr = 4;
@ -449,7 +444,6 @@ DEFUN (ip_route_mask,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 2; int idx_ipv4 = 2;
int idx_ipv4_2 = 3; int idx_ipv4_2 = 3;
int idx_ipv4_ifname_null = 4; int idx_ipv4_ifname_null = 4;
@ -482,7 +476,6 @@ DEFUN (ip_route_mask_flags,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 2; int idx_ipv4 = 2;
int idx_ipv4_2 = 3; int idx_ipv4_2 = 3;
int idx_ipv4_ifname = 4; int idx_ipv4_ifname = 4;
@ -516,7 +509,6 @@ DEFUN (ip_route_mask_flags2,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 2; int idx_ipv4 = 2;
int idx_ipv4_2 = 3; int idx_ipv4_2 = 3;
int idx_reject_blackhole = 4; int idx_reject_blackhole = 4;
@ -549,7 +541,6 @@ DEFUN (no_ip_route,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4_prefixlen = 3; int idx_ipv4_prefixlen = 3;
int idx_ipv4_ifname_null = 4; int idx_ipv4_ifname_null = 4;
int idx_curr = 5; int idx_curr = 5;
@ -580,7 +571,6 @@ DEFUN (no_ip_route_flags2,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4_prefixlen = 3; int idx_ipv4_prefixlen = 3;
int idx_curr = 5; int idx_curr = 5;
char *tag, *distance, *vrf; char *tag, *distance, *vrf;
@ -610,7 +600,6 @@ DEFUN (no_ip_route_mask,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 3; int idx_ipv4 = 3;
int idx_ipv4_2 = 4; int idx_ipv4_2 = 4;
int idx_ipv4_ifname_null = 5; int idx_ipv4_ifname_null = 5;
@ -643,7 +632,6 @@ DEFUN (no_ip_route_mask_flags2,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 3; int idx_ipv4 = 3;
int idx_ipv4_2 = 4; int idx_ipv4_2 = 4;
int idx_curr = 6; int idx_curr = 6;
@ -675,7 +663,6 @@ DEFUN (no_ip_route_flags,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4_prefixlen = 3; int idx_ipv4_prefixlen = 3;
int idx_ipv4_ifname = 4; int idx_ipv4_ifname = 4;
int idx_reject_blackhole = 5; int idx_reject_blackhole = 5;
@ -710,7 +697,6 @@ DEFUN (no_ip_route_mask_flags,
"Distance value for this route\n" "Distance value for this route\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv4 = 3; int idx_ipv4 = 3;
int idx_ipv4_2 = 4; int idx_ipv4_2 = 4;
int idx_ipv4_ifname = 5; int idx_ipv4_ifname = 5;
@ -1153,7 +1139,6 @@ DEFUN (show_ip_route,
IP_STR IP_STR
"IP routing table\n") "IP routing table\n")
{ {
/* CHECK ME argc referenced below */
return do_show_ip_route (vty, VRF_DEFAULT_NAME, SAFI_UNICAST, use_json(argc, argv)); return do_show_ip_route (vty, VRF_DEFAULT_NAME, SAFI_UNICAST, use_json(argc, argv));
} }
@ -1249,14 +1234,11 @@ DEFUN (show_ip_route_vrf,
"IP routing table\n" "IP routing table\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */ int idx_vrf = 4;
int idx_json = 5; int idx_json = 5;
u_char uj = use_json(argc, argv); u_char uj = use_json(argc, argv);
if (argc == 1 && uj) return do_show_ip_route (vty, argv[idx_vrf]->arg, SAFI_UNICAST, uj);
return do_show_ip_route (vty, NULL, SAFI_UNICAST, uj);
else
return do_show_ip_route (vty, argv[idx_json]->arg, SAFI_UNICAST, uj);
} }
DEFUN (show_ip_nht, DEFUN (show_ip_nht,
@ -1267,7 +1249,6 @@ DEFUN (show_ip_nht,
"IP nexthop tracking table\n" "IP nexthop tracking table\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_vrf = 4; int idx_vrf = 4;
vrf_id_t vrf_id = VRF_DEFAULT; vrf_id_t vrf_id = VRF_DEFAULT;
@ -1308,7 +1289,6 @@ DEFUN (show_ipv6_nht,
"IPv6 nexthop tracking table\n" "IPv6 nexthop tracking table\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_vrf = 4; int idx_vrf = 4;
vrf_id_t vrf_id = VRF_DEFAULT; vrf_id_t vrf_id = VRF_DEFAULT;
@ -2525,7 +2505,6 @@ DEFUN (ipv6_route,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 2; int idx_ipv6_prefixlen = 2;
int idx_ipv6_ifname = 3; int idx_ipv6_ifname = 3;
int idx_curr = 4; int idx_curr = 4;
@ -2558,7 +2537,6 @@ DEFUN (ipv6_route_flags,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 2; int idx_ipv6_prefixlen = 2;
int idx_ipv6_ifname = 3; int idx_ipv6_ifname = 3;
int idx_reject_blackhole = 4; int idx_reject_blackhole = 4;
@ -2589,7 +2567,6 @@ DEFUN (ipv6_route_ifname,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 2; int idx_ipv6_prefixlen = 2;
int idx_ipv6 = 3; int idx_ipv6 = 3;
int idx_interface = 4; int idx_interface = 4;
@ -2622,7 +2599,6 @@ DEFUN (ipv6_route_ifname_flags,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 2; int idx_ipv6_prefixlen = 2;
int idx_ipv6 = 3; int idx_ipv6 = 3;
int idx_interface = 4; int idx_interface = 4;
@ -2655,7 +2631,6 @@ DEFUN (no_ipv6_route,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 3; int idx_ipv6_prefixlen = 3;
int idx_ipv6_ifname = 4; int idx_ipv6_ifname = 4;
int idx_curr = 5; int idx_curr = 5;
@ -2687,7 +2662,6 @@ DEFUN (no_ipv6_route_flags,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 3; int idx_ipv6_prefixlen = 3;
int idx_ipv6_ifname = 4; int idx_ipv6_ifname = 4;
int idx_reject_blackhole = 5; int idx_reject_blackhole = 5;
@ -2719,7 +2693,6 @@ DEFUN (no_ipv6_route_ifname,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 3; int idx_ipv6_prefixlen = 3;
int idx_ipv6 = 4; int idx_ipv6 = 4;
int idx_interface = 5; int idx_interface = 5;
@ -2753,7 +2726,6 @@ DEFUN (no_ipv6_route_ifname_flags,
"Distance value for this prefix\n" "Distance value for this prefix\n"
VRF_CMD_HELP_STR) VRF_CMD_HELP_STR)
{ {
/* CHECK ME argc referenced below */
int idx_ipv6_prefixlen = 3; int idx_ipv6_prefixlen = 3;
int idx_ipv6 = 4; int idx_ipv6 = 4;
int idx_interface = 5; int idx_interface = 5;