diff options
-rw-r--r-- | bgpd/bgp_filter.c | 6 | ||||
-rw-r--r-- | bgpd/bgp_routemap.c | 28 | ||||
-rw-r--r-- | bgpd/bgp_vty.c | 15 | ||||
-rw-r--r-- | lib/command.c | 23 | ||||
-rw-r--r-- | lib/filter.c | 10 | ||||
-rw-r--r-- | lib/grammar_sandbox.c | 12 | ||||
-rw-r--r-- | lib/if.c | 9 | ||||
-rw-r--r-- | lib/plist.c | 10 | ||||
-rw-r--r-- | lib/routemap.c | 6 | ||||
-rw-r--r-- | lib/vty.c | 1 | ||||
-rw-r--r-- | ospfd/ospf_dump.c | 4 | ||||
-rw-r--r-- | ospfd/ospf_ri.c | 1 | ||||
-rw-r--r-- | ospfd/ospf_routemap.c | 9 | ||||
-rw-r--r-- | pimd/pim_cmd.c | 12 | ||||
-rw-r--r-- | zebra/rtadv.c | 1 | ||||
-rw-r--r-- | zebra/zebra_vty.c | 4 |
16 files changed, 55 insertions, 96 deletions
diff --git a/bgpd/bgp_filter.c b/bgpd/bgp_filter.c index 255f6c2b6..cee68e4d4 100644 --- a/bgpd/bgp_filter.c +++ b/bgpd/bgp_filter.c @@ -437,7 +437,6 @@ DEFUN (ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { - /* CHECK ME argc referenced below */ int idx_word = 3; int idx_permit_deny = 4; enum as_filter_type type; @@ -458,7 +457,7 @@ DEFUN (ip_as_path, } /* Check AS path regex. */ - regstr = argv_concat(argv, argc, 2); + regstr = argv_concat(argv, argc, idx_permit_deny); regex = bgp_regcomp (regstr); if (!regex) @@ -497,7 +496,6 @@ DEFUN (no_ip_as_path, "Specify packets to forward\n" "A regular-expression to match the BGP AS paths\n") { - /* CHECK ME argc referenced below */ int idx_word = 4; int idx_permit_deny = 5; enum as_filter_type type; @@ -527,7 +525,7 @@ DEFUN (no_ip_as_path, } /* Compile AS path. */ - regstr = argv_concat(argv, argc, 2); + regstr = argv_concat(argv, argc, idx_permit_deny); regex = bgp_regcomp (regstr); if (!regex) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 3ddfef4be..d57d58866 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -3719,11 +3719,11 @@ DEFUN (set_aspath_prepend, "Use the peer's AS-number\n" "Number of times to insert") { - /* CHECK ME argc referenced below */ + int idx_asn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_add (vty, vty->index, "as-path prepend", str); XFREE (MTYPE_TMP, str); @@ -3740,11 +3740,11 @@ DEFUN (no_set_aspath_prepend, "Prepend to the as-path\n" "AS number\n") { - /* CHECK ME argc referenced below */ + int idx_asn = 4; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_delete (vty, vty->index, "as-path prepend", str); XFREE (MTYPE_TMP, str); return ret; @@ -3759,11 +3759,11 @@ DEFUN (set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { - /* CHECK ME argc referenced below */ + int idx_asn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_add (vty, vty->index, "as-path exclude", str); XFREE (MTYPE_TMP, str); return ret; @@ -3778,11 +3778,11 @@ DEFUN (no_set_aspath_exclude, "Exclude from the as-path\n" "AS number\n") { - /* CHECK ME argc referenced below */ + int idx_asn = 4; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn); ret = bgp_route_set_delete (vty, vty->index, "as-path exclude", str); XFREE (MTYPE_TMP, str); return ret; @@ -3796,7 +3796,7 @@ DEFUN (set_community, "BGP community attribute\n" COMMUNITY_VAL_STR) { - /* CHECK ME argc referenced below */ + int idx_aa_nn = 2; int i; int first = 0; int additive = 0; @@ -3808,7 +3808,7 @@ DEFUN (set_community, b = buffer_new (1024); - for (i = 0; i < argc; i++) + for (i = idx_aa_nn; i < argc; i++) { if (strncmp (argv[i]->arg, "additive", strlen (argv[i]->arg)) == 0) { @@ -3947,11 +3947,11 @@ DEFUN (set_ecommunity_rt, "Route Target extended community\n" "VPN extended community\n") { - /* CHECK ME argc referenced below */ + int idx_asn_nn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn_nn); ret = bgp_route_set_add (vty, vty->index, "extcommunity rt", str); XFREE (MTYPE_TMP, str); @@ -3978,11 +3978,11 @@ DEFUN (set_ecommunity_soo, "Site-of-Origin extended community\n" "VPN extended community\n") { - /* CHECK ME argc referenced below */ + int idx_asn_nn = 3; int ret; char *str; - str = argv_concat (argv, argc, 0); + str = argv_concat (argv, argc, idx_asn_nn); ret = bgp_route_set_add (vty, vty->index, "extcommunity soo", str); XFREE (MTYPE_TMP, str); return ret; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 4e4571a01..0ced86023 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -949,14 +949,14 @@ DEFUN (bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { - /* CHECK ME argc referenced below */ + int idx_asn = 3; struct bgp *bgp; as_t as; int i; bgp = vty->index; - for (i = 0; i < argc; i++) + for (i = idx_asn; i < argc; i++) { VTY_GET_INTEGER_RANGE ("AS", as, argv[i]->arg, 1, BGP_AS4_MAX); @@ -981,14 +981,14 @@ DEFUN (no_bgp_confederation_peers, "Peer ASs in BGP confederation\n" AS_STR) { - /* CHECK ME argc referenced below */ + int idx_asn = 4; struct bgp *bgp; as_t as; int i; bgp = vty->index; - for (i = 0; i < argc; i++) + for (i = idx_asn; i < argc; i++) { VTY_GET_INTEGER_RANGE ("AS", as, argv[i]->arg, 1, BGP_AS4_MAX); @@ -4329,8 +4329,8 @@ DEFUN (neighbor_description, "Neighbor specific description\n" "Up to 80 characters describing this neighbor\n") { - /* CHECK ME argc referenced below */ int idx_peer = 1; + int idx_line = 3; struct peer *peer; char *str; @@ -4338,10 +4338,7 @@ DEFUN (neighbor_description, if (! peer) return CMD_WARNING; - if (argc == 1) - return CMD_SUCCESS; - - str = argv_concat(argv, argc, 1); + str = argv_concat(argv, argc, idx_line); peer_description_set (peer, str); diff --git a/lib/command.c b/lib/command.c index 4be178e12..95d69cdbf 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1016,7 +1016,6 @@ DEFUN (config_quit, "quit", "Exit current mode and down to previous mode\n") { - /* CHECK ME argc referenced below */ return config_exit (self, vty, argc, argv); } @@ -1138,7 +1137,6 @@ DEFUN (config_write, "Write configuration currently in memory\n" "Write configuration to terminal\n") { - /* CHECK ME argc referenced below */ int idx_type = 1; unsigned int i; int fd; @@ -1284,7 +1282,6 @@ DEFUN (show_running_config, SHOW_STR "running configuration (same as write terminal/memory)\n") { - /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } @@ -1296,7 +1293,6 @@ DEFUN (copy_runningconf_startupconf, "Copy running config to... \n" "Copy running config to startup config (same as write file)\n") { - /* CHECK ME argc referenced below */ return config_write (self, vty, argc, argv); } /** -- **/ @@ -1378,7 +1374,6 @@ DEFUN (config_password, "Specifies a HIDDEN password will follow\n" "The password string\n") { - /* CHECK ME argc referenced below */ int idx_8 = 1; int idx_word = 2; if (argc == 3) // '8' was specified @@ -1425,9 +1420,9 @@ DEFUN (config_enable_password, "dummy string \n" "The HIDDEN 'enable' password string\n") { - /* CHECK ME argc referenced below */ int idx_8 = 2; int idx_word = 3; + /* Crypt type is specified. */ if (argc == 4) { @@ -1618,7 +1613,7 @@ DEFUN_HIDDEN (do_echo, { char *message; - vty_out (vty, "%s%s", ((message = argv_concat (argv, argc, 0)) ? message : ""), + vty_out (vty, "%s%s", ((message = argv_concat (argv, argc, 1)) ? message : ""), VTY_NEWLINE); if (message) XFREE(MTYPE_TMP, message); @@ -1632,15 +1627,15 @@ DEFUN (config_logmsg, LOG_LEVEL_DESC "The message to send\n") { - /* CHECK ME argc referenced below */ int idx_log_level = 1; + int idx_message = 2; int level; char *message; if ((level = level_match(argv[idx_log_level]->arg)) == ZLOG_DISABLED) return CMD_ERR_NO_MATCH; - zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, 1)) ? message : "")); + zlog(NULL, level, "%s", ((message = argv_concat(argv, argc, idx_message)) ? message : "")); if (message) XFREE(MTYPE_TMP, message); return CMD_SUCCESS; @@ -1706,9 +1701,9 @@ DEFUN (config_log_stdout, "Set stdout logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_level = 2; - if (argc == 2) + + if (argc == idx_log_level) { zlog_set_level (NULL, ZLOG_DEST_STDOUT, zlog_default->default_lvl); return CMD_SUCCESS; @@ -1740,9 +1735,9 @@ DEFUN (config_log_monitor, "Set terminal line (monitor) logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_level = 2; - if (argc == 2) + + if (argc == idx_log_level) { zlog_set_level (NULL, ZLOG_DEST_MONITOR, zlog_default->default_lvl); return CMD_SUCCESS; @@ -1829,7 +1824,6 @@ DEFUN (config_log_file, "Logging filename\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_filename = 2; int idx_log_levels = 3; if (argc == 4) @@ -1870,7 +1864,6 @@ DEFUN (config_log_syslog, "Set syslog logging level\n" LOG_LEVEL_DESC) { - /* CHECK ME argc referenced below */ int idx_log_levels = 2; if (argc == 3) { diff --git a/lib/filter.c b/lib/filter.c index fd80b2a63..501b28f2d 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -1480,8 +1480,8 @@ DEFUN (access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ int idx_acl = 1; + int idx_remark = 3; struct access_list *access; access = access_list_get (AFI_IP, argv[idx_acl]->arg); @@ -1491,7 +1491,7 @@ DEFUN (access_list_remark, XFREE (MTYPE_TMP, access->remark); access->remark = NULL; } - access->remark = argv_concat(argv, argc, 1); + access->remark = argv_concat(argv, argc, idx_remark); return CMD_SUCCESS; } @@ -1526,7 +1526,6 @@ DEFUN (no_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ return no_access_list_remark (self, vty, argc, argv); } @@ -1675,8 +1674,8 @@ DEFUN (ipv6_access_list_remark, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ int idx_word = 2; + int idx_line = 4; struct access_list *access; access = access_list_get (AFI_IP6, argv[idx_word]->arg); @@ -1686,7 +1685,7 @@ DEFUN (ipv6_access_list_remark, XFREE (MTYPE_TMP, access->remark); access->remark = NULL; } - access->remark = argv_concat(argv, argc, 1); + access->remark = argv_concat(argv, argc, idx_line); return CMD_SUCCESS; } @@ -1715,7 +1714,6 @@ DEFUN (no_ipv6_access_list_remark_comment, "Access list entry comment\n" "Comment up to 100 characters\n") { - /* CHECK ME argc referenced below */ return no_ipv6_access_list_remark (self, vty, argc, argv); } diff --git a/lib/grammar_sandbox.c b/lib/grammar_sandbox.c index 34e0b8106..c4ae2d7d7 100644 --- a/lib/grammar_sandbox.c +++ b/lib/grammar_sandbox.c @@ -57,9 +57,9 @@ DEFUN (grammar_test, GRAMMAR_STR "command to pass to new parser\n") { - /* CHECK ME argc referenced below */ + int idx_command = 2; // make a string from tokenized command line - char *command = argv_concat (argv, argc, 0); + char *command = argv_concat (argv, argc, idx_command); // create cmd_element for parser struct cmd_element *cmd = XCALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_element)); @@ -81,8 +81,8 @@ DEFUN (grammar_test_complete, "attempt to complete input on DFA\n" "command to complete") { - /* CHECK ME argc referenced below */ - char *cmdstr = argv_concat (argv, argc, 0); + int idx_command = 2; + char *cmdstr = argv_concat (argv, argc, idx_command); vector command = cmd_make_strvec (cmdstr); // generate completions of user input @@ -131,11 +131,11 @@ DEFUN (grammar_test_match, "attempt to match input on DFA\n" "command to match") { - /* CHECK ME argc referenced below */ + int idx_command = 2; if (argv[0][0] == '#') return CMD_SUCCESS; - char *cmdstr = argv_concat(argv, argc, 0); + char *cmdstr = argv_concat(argv, argc, idx_command); vector command = cmd_make_strvec (cmdstr); struct list *argvv = NULL; @@ -677,16 +677,13 @@ DEFUN (interface_desc, "Interface specific description\n" "Characters describing this interface\n") { - /* CHECK ME argc referenced below */ + int idx_line = 1; struct interface *ifp; - if (argc == 1) - return CMD_SUCCESS; - ifp = vty->index; if (ifp->desc) XFREE (MTYPE_TMP, ifp->desc); - ifp->desc = argv_concat(argv, argc, 1); + ifp->desc = argv_concat(argv, argc, idx_line); return CMD_SUCCESS; } @@ -910,7 +907,7 @@ DEFUN (show_address, vrf_id_t vrf_id = VRF_DEFAULT; if (argc > 2) - VRF_GET_ID (vrf_id, argv[idx_vrf_cmd_str]->arg); + VRF_GET_ID (vrf_id, argv[idx_vrf]->arg); for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp)) { diff --git a/lib/plist.c b/lib/plist.c index 4170230d8..23d580bd6 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1905,8 +1905,8 @@ DEFUN (ip_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ int idx_word = 2; + int idx_line = 4; struct prefix_list *plist; plist = prefix_list_get (AFI_IP, 0, argv[idx_word]->arg); @@ -1916,7 +1916,7 @@ DEFUN (ip_prefix_list_description, XFREE (MTYPE_TMP, plist->desc); plist->desc = NULL; } - plist->desc = argv_concat(argv, argc, 1); + plist->desc = argv_concat(argv, argc, idx_line); return CMD_SUCCESS; } @@ -1945,7 +1945,6 @@ DEFUN (no_ip_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ return no_ip_prefix_list_description (self, vty, argc, argv); } @@ -2618,8 +2617,8 @@ DEFUN (ipv6_prefix_list_description, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ int idx_word = 2; + int iddx_line = 4; struct prefix_list *plist; plist = prefix_list_get (AFI_IP6, 0, argv[idx_word]->arg); @@ -2629,7 +2628,7 @@ DEFUN (ipv6_prefix_list_description, XFREE (MTYPE_TMP, plist->desc); plist->desc = NULL; } - plist->desc = argv_concat(argv, argc, 1); + plist->desc = argv_concat(argv, argc, iddx_line); return CMD_SUCCESS; } @@ -2658,7 +2657,6 @@ DEFUN (no_ipv6_prefix_list_description_comment, "Prefix-list specific description\n" "Up to 80 characters describing this prefix-list\n") { - /* CHECK ME argc referenced below */ return no_ipv6_prefix_list_description_comment (self, vty, argc, argv); } diff --git a/lib/routemap.c b/lib/routemap.c index b3d349d2f..2e8637bcb 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1606,7 +1606,6 @@ DEFUN (rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { - /* CHECK ME argc referenced below */ return rmap_onmatch_goto (self, vty, argc, argv); } @@ -1618,7 +1617,6 @@ DEFUN (no_rmap_continue, "Continue on a different entry within the route-map\n" "Route-map entry sequence number\n") { - /* CHECK ME argc referenced below */ return no_rmap_onmatch_goto (self, vty, argc, argv); } @@ -1693,7 +1691,7 @@ DEFUN (rmap_description, "Route-map comment\n" "Comment describing this route-map rule\n") { - /* CHECK ME argc referenced below */ + int idx_line = 1; struct route_map_index *index; index = vty->index; @@ -1701,7 +1699,7 @@ DEFUN (rmap_description, { if (index->description) XFREE (MTYPE_TMP, index->description); - index->description = argv_concat (argv, argc, 1); + index->description = argv_concat (argv, argc, idx_line); } return CMD_SUCCESS; } @@ -2948,7 +2948,6 @@ DEFUN (no_terminal_monitor, "Set terminal line parameters\n" "Copy debug output to the current terminal line\n") { - /* CHECK ME argc referenced below */ return terminal_no_monitor (self, vty, argc, argv); } diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index c55ce1de8..08afb75d2 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -772,7 +772,6 @@ DEFUN (debug_ospf_packet, "Detail Information\n" "Detail Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -850,7 +849,6 @@ DEFUN (no_debug_ospf_packet, "Detail Information\n" "Detail Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN) ? 1 : 0; int detail = strmatch (argv[argc - 1]->text, "detail"); int send = strmatch (argv[argc - (1+detail)]->text, "send"); @@ -926,7 +924,6 @@ DEFUN (debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[2]->type == RANGE_TKN); char *dbgparam = (argc == 4 + inst) ? argv[argc - 1]->text : NULL; @@ -980,7 +977,6 @@ DEFUN (no_debug_ospf_ism, "ISM Event Information\n" "ISM TImer Information\n") { - /* CHECK ME argc referenced below */ int inst = (argv[3]->type == RANGE_TKN); char *dbgparam = (argc == 5 + inst) ? argv[argc - 1]->text : NULL; diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c index 463671f7d..bcb1cd8e2 100644 --- a/ospfd/ospf_ri.c +++ b/ospfd/ospf_ri.c @@ -1182,7 +1182,6 @@ DEFUN (router_info, "Enable the Router Information functionality with Area flooding scope\n" "OSPF area ID in IP format") { - /* CHECK ME argc referenced below */ int idx_ipv4 = 2; char *area = (argc == 3) ? argv[idx_ipv4]->arg : NULL; diff --git a/ospfd/ospf_routemap.c b/ospfd/ospf_routemap.c index 1cb29f3ef..33ddc67fc 100644 --- a/ospfd/ospf_routemap.c +++ b/ospfd/ospf_routemap.c @@ -715,7 +715,6 @@ DEFUN (no_match_ip_nexthop, "IP access-list number (expanded range)\n" "IP access-list name\n") { - /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop", al); } @@ -745,7 +744,6 @@ DEFUN (no_match_ip_next_hop_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip next-hop prefix-list", pl); } @@ -776,7 +774,6 @@ DEFUN (no_match_ip_address, "IP access-list number (expanded range)\n" "IP access-list name\n") { - /* CHECK ME argc referenced below */ char *al = (argc == 5) ? argv[4]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address", al); } @@ -805,7 +802,6 @@ DEFUN (no_match_ip_address_prefix_list, "Match entries of prefix-lists\n" "IP prefix-list name\n") { - /* CHECK ME argc referenced below */ char *pl = (argc == 6) ? argv[5]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "ip address prefix-list", pl); } @@ -829,7 +825,6 @@ DEFUN (no_match_interface, "Match first hop interface of route\n" "Interface name\n") { - /* CHECK ME argc referenced below */ char *iface = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "interface", iface); } @@ -853,7 +848,6 @@ DEFUN (no_match_tag, "Match tag of route\n" "Tag value\n") { - /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_match_delete (vty, vty->index, "tag", tag); } @@ -877,7 +871,6 @@ DEFUN (no_set_metric, "Metric value for destination routing protocol\n" "Metric value\n") { - /* CHECK ME argc referenced below */ char *mval = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "metric", mval); } @@ -903,7 +896,6 @@ DEFUN (no_set_metric_type, "OSPF[6] external type 1 metric\n" "OSPF[6] external type 2 metric\n") { - /* CHECK ME argc referenced below */ char *ext = (argc == 4) ? argv[3]->text : NULL; return ospf_route_set_delete (vty, vty->index, "metric-type", ext); } @@ -927,7 +919,6 @@ DEFUN (no_set_tag, "Tag value for routing protocol\n" "Tag value\n") { - /* CHECK ME argc referenced below */ char *tag = (argc == 4) ? argv[3]->arg : NULL; return ospf_route_set_delete (vty, vty->index, "tag", tag); } diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 5f2dcefdc..8cc5cf95d 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -4052,10 +4052,10 @@ DEFUN (test_igmp_receive_report, "Record type\n" "Sources\n") { - /* CHECK ME argc referenced below */ int idx_number = 4; int idx_ipv4 = 5; int idx_number_2 = 6; + int idx_line = 7; char buf[1000]; char *igmp_msg; struct ip *ip_hdr; @@ -4121,7 +4121,7 @@ DEFUN (test_igmp_receive_report, /* Scan LINE sources */ sources = (struct in_addr *) (group_record + IGMP_V3_GROUP_RECORD_SOURCE_OFFSET); src_addr = sources; - for (argi = 3; argi < argc; ++argi,++src_addr) { + for (argi = idx_line; argi < argc; ++argi,++src_addr) { src_str = argv[argi]->arg; result = inet_pton(AF_INET, src_str, src_addr); if (result <= 0) { @@ -4168,9 +4168,9 @@ DEFUN (test_pim_receive_dump, "Neighbor address\n" "Packet dump\n") { - /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; + int idx_line = 6; uint8_t buf[1000]; uint8_t *pim_msg; struct ip *ip_hdr; @@ -4219,7 +4219,7 @@ DEFUN (test_pim_receive_dump, pim_msg_size = 0; /* Scan LINE dump into buffer */ - for (argi = 2; argi < argc; ++argi) { + for (argi = idx_line; argi < argc; ++argi) { const char *str = argv[argi]->arg; int str_len = strlen(str); int str_last = str_len - 1; @@ -4289,7 +4289,6 @@ DEFUN (test_pim_receive_hello, "Neighbor LAN prune delay T-bit\n" "Neighbor secondary addresses\n") { - /* CHECK ME argc referenced below */ int idx_interface = 4; int idx_ipv4 = 5; int idx_number = 6; @@ -4298,6 +4297,7 @@ DEFUN (test_pim_receive_hello, int idx_number_4 = 9; int idx_number_5 = 10; int idx_number_6 = 11; + int idx_line = 12; uint8_t buf[1000]; uint8_t *pim_msg; struct ip *ip_hdr; @@ -4359,7 +4359,7 @@ DEFUN (test_pim_receive_hello, pim_msg = buf + ip_hlen; /* Scan LINE addresses */ - for (argi = 8; argi < argc; ++argi) { + for (argi = idx_line; argi < argc; ++argi) { const char *sec_str = argv[argi]->arg; struct in_addr sec_addr; result = inet_pton(AF_INET, sec_str, &sec_addr); diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 277cf4f06..7edba5595 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -1342,7 +1342,6 @@ DEFUN (ipv6_nd_prefix, "Do not use prefix for autoconfiguration\n" "Do not use prefix for onlink determination\n") { - /* CHECK ME argc referenced below */ /* prelude */ char *prefix = argv[3]->arg; int lifetimes = (argc > 4) && (argv[4]->type == RANGE_TKN || strmatch (argv[4]->text, "infinite")); diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 02b68201e..e6e7f5d2e 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1235,7 +1235,6 @@ DEFUN (show_ip_route_vrf, VRF_CMD_HELP_STR) { int idx_vrf = 4; - int idx_json = 5; u_char uj = use_json(argc, argv); return do_show_ip_route (vty, argv[idx_vrf]->arg, SAFI_UNICAST, uj); @@ -2753,7 +2752,6 @@ DEFUN (show_ipv6_route, VRF_CMD_HELP_STR "Output JSON\n") { - /* CHECK ME argc referenced below */ struct route_table *table; struct route_node *rn; struct rib *rib; @@ -2954,7 +2952,6 @@ DEFUN (show_ipv6_route_protocol, VRF_CMD_HELP_STR QUAGGA_IP6_REDIST_HELP_STR_ZEBRA) { - /* CHECK ME argc referenced below */ int type; struct route_table *table; struct route_node *rn; @@ -3699,7 +3696,6 @@ DEFUN (ip_zebra_import_table_distance, "route-map for filtering\n" "route-map name\n") { - /* CHECK ME argc referenced below */ u_int32_t table_id = 0; VTY_GET_INTEGER("table", table_id, argv[2]->arg); |