mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
all: scrubbed some argc CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This commit is contained in:
parent
d8bd2affd3
commit
58749582a9
@ -437,7 +437,6 @@ DEFUN (ip_as_path,
|
|||||||
"Specify packets to forward\n"
|
"Specify packets to forward\n"
|
||||||
"A regular-expression to match the BGP AS paths\n")
|
"A regular-expression to match the BGP AS paths\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_word = 3;
|
int idx_word = 3;
|
||||||
int idx_permit_deny = 4;
|
int idx_permit_deny = 4;
|
||||||
enum as_filter_type type;
|
enum as_filter_type type;
|
||||||
@ -458,7 +457,7 @@ DEFUN (ip_as_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check AS path regex. */
|
/* Check AS path regex. */
|
||||||
regstr = argv_concat(argv, argc, 2);
|
regstr = argv_concat(argv, argc, idx_permit_deny);
|
||||||
|
|
||||||
regex = bgp_regcomp (regstr);
|
regex = bgp_regcomp (regstr);
|
||||||
if (!regex)
|
if (!regex)
|
||||||
@ -497,7 +496,6 @@ DEFUN (no_ip_as_path,
|
|||||||
"Specify packets to forward\n"
|
"Specify packets to forward\n"
|
||||||
"A regular-expression to match the BGP AS paths\n")
|
"A regular-expression to match the BGP AS paths\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_word = 4;
|
int idx_word = 4;
|
||||||
int idx_permit_deny = 5;
|
int idx_permit_deny = 5;
|
||||||
enum as_filter_type type;
|
enum as_filter_type type;
|
||||||
@ -527,7 +525,7 @@ DEFUN (no_ip_as_path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Compile AS path. */
|
/* Compile AS path. */
|
||||||
regstr = argv_concat(argv, argc, 2);
|
regstr = argv_concat(argv, argc, idx_permit_deny);
|
||||||
|
|
||||||
regex = bgp_regcomp (regstr);
|
regex = bgp_regcomp (regstr);
|
||||||
if (!regex)
|
if (!regex)
|
||||||
|
@ -3719,11 +3719,11 @@ DEFUN (set_aspath_prepend,
|
|||||||
"Use the peer's AS-number\n"
|
"Use the peer's AS-number\n"
|
||||||
"Number of times to insert")
|
"Number of times to insert")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn = 3;
|
||||||
int ret;
|
int ret;
|
||||||
char *str;
|
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);
|
ret = bgp_route_set_add (vty, vty->index, "as-path prepend", str);
|
||||||
XFREE (MTYPE_TMP, str);
|
XFREE (MTYPE_TMP, str);
|
||||||
|
|
||||||
@ -3740,11 +3740,11 @@ DEFUN (no_set_aspath_prepend,
|
|||||||
"Prepend to the as-path\n"
|
"Prepend to the as-path\n"
|
||||||
"AS number\n")
|
"AS number\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn = 4;
|
||||||
int ret;
|
int ret;
|
||||||
char *str;
|
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);
|
ret = bgp_route_set_delete (vty, vty->index, "as-path prepend", str);
|
||||||
XFREE (MTYPE_TMP, str);
|
XFREE (MTYPE_TMP, str);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3759,11 +3759,11 @@ DEFUN (set_aspath_exclude,
|
|||||||
"Exclude from the as-path\n"
|
"Exclude from the as-path\n"
|
||||||
"AS number\n")
|
"AS number\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn = 3;
|
||||||
int ret;
|
int ret;
|
||||||
char *str;
|
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);
|
ret = bgp_route_set_add (vty, vty->index, "as-path exclude", str);
|
||||||
XFREE (MTYPE_TMP, str);
|
XFREE (MTYPE_TMP, str);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3778,11 +3778,11 @@ DEFUN (no_set_aspath_exclude,
|
|||||||
"Exclude from the as-path\n"
|
"Exclude from the as-path\n"
|
||||||
"AS number\n")
|
"AS number\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn = 4;
|
||||||
int ret;
|
int ret;
|
||||||
char *str;
|
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);
|
ret = bgp_route_set_delete (vty, vty->index, "as-path exclude", str);
|
||||||
XFREE (MTYPE_TMP, str);
|
XFREE (MTYPE_TMP, str);
|
||||||
return ret;
|
return ret;
|
||||||
@ -3796,7 +3796,7 @@ DEFUN (set_community,
|
|||||||
"BGP community attribute\n"
|
"BGP community attribute\n"
|
||||||
COMMUNITY_VAL_STR)
|
COMMUNITY_VAL_STR)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_aa_nn = 2;
|
||||||
int i;
|
int i;
|
||||||
int first = 0;
|
int first = 0;
|
||||||
int additive = 0;
|
int additive = 0;
|
||||||
@ -3808,7 +3808,7 @@ DEFUN (set_community,
|
|||||||
|
|
||||||
b = buffer_new (1024);
|
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)
|
if (strncmp (argv[i]->arg, "additive", strlen (argv[i]->arg)) == 0)
|
||||||
{
|
{
|
||||||
@ -3947,11 +3947,11 @@ DEFUN (set_ecommunity_rt,
|
|||||||
"Route Target extended community\n"
|
"Route Target extended community\n"
|
||||||
"VPN extended community\n")
|
"VPN extended community\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn_nn = 3;
|
||||||
int ret;
|
int ret;
|
||||||
char *str;
|
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);
|
ret = bgp_route_set_add (vty, vty->index, "extcommunity rt", str);
|
||||||
XFREE (MTYPE_TMP, str);
|
XFREE (MTYPE_TMP, str);
|
||||||
|
|
||||||
@ -3978,11 +3978,11 @@ DEFUN (set_ecommunity_soo,
|
|||||||
"Site-of-Origin extended community\n"
|
"Site-of-Origin extended community\n"
|
||||||
"VPN extended community\n")
|
"VPN extended community\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn_nn = 3;
|
||||||
int ret;
|
int ret;
|
||||||
char *str;
|
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);
|
ret = bgp_route_set_add (vty, vty->index, "extcommunity soo", str);
|
||||||
XFREE (MTYPE_TMP, str);
|
XFREE (MTYPE_TMP, str);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -949,14 +949,14 @@ DEFUN (bgp_confederation_peers,
|
|||||||
"Peer ASs in BGP confederation\n"
|
"Peer ASs in BGP confederation\n"
|
||||||
AS_STR)
|
AS_STR)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn = 3;
|
||||||
struct bgp *bgp;
|
struct bgp *bgp;
|
||||||
as_t as;
|
as_t as;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
bgp = vty->index;
|
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);
|
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"
|
"Peer ASs in BGP confederation\n"
|
||||||
AS_STR)
|
AS_STR)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_asn = 4;
|
||||||
struct bgp *bgp;
|
struct bgp *bgp;
|
||||||
as_t as;
|
as_t as;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
bgp = vty->index;
|
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);
|
VTY_GET_INTEGER_RANGE ("AS", as, argv[i]->arg, 1, BGP_AS4_MAX);
|
||||||
|
|
||||||
@ -4329,8 +4329,8 @@ DEFUN (neighbor_description,
|
|||||||
"Neighbor specific description\n"
|
"Neighbor specific description\n"
|
||||||
"Up to 80 characters describing this neighbor\n")
|
"Up to 80 characters describing this neighbor\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_peer = 1;
|
int idx_peer = 1;
|
||||||
|
int idx_line = 3;
|
||||||
struct peer *peer;
|
struct peer *peer;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
@ -4338,10 +4338,7 @@ DEFUN (neighbor_description,
|
|||||||
if (! peer)
|
if (! peer)
|
||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
|
|
||||||
if (argc == 1)
|
str = argv_concat(argv, argc, idx_line);
|
||||||
return CMD_SUCCESS;
|
|
||||||
|
|
||||||
str = argv_concat(argv, argc, 1);
|
|
||||||
|
|
||||||
peer_description_set (peer, str);
|
peer_description_set (peer, str);
|
||||||
|
|
||||||
|
@ -1016,7 +1016,6 @@ DEFUN (config_quit,
|
|||||||
"quit",
|
"quit",
|
||||||
"Exit current mode and down to previous mode\n")
|
"Exit current mode and down to previous mode\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return config_exit (self, vty, argc, argv);
|
return config_exit (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1138,7 +1137,6 @@ DEFUN (config_write,
|
|||||||
"Write configuration currently in memory\n"
|
"Write configuration currently in memory\n"
|
||||||
"Write configuration to terminal\n")
|
"Write configuration to terminal\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_type = 1;
|
int idx_type = 1;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int fd;
|
int fd;
|
||||||
@ -1284,7 +1282,6 @@ DEFUN (show_running_config,
|
|||||||
SHOW_STR
|
SHOW_STR
|
||||||
"running configuration (same as write terminal/memory)\n")
|
"running configuration (same as write terminal/memory)\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return config_write (self, vty, argc, argv);
|
return config_write (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1296,7 +1293,6 @@ DEFUN (copy_runningconf_startupconf,
|
|||||||
"Copy running config to... \n"
|
"Copy running config to... \n"
|
||||||
"Copy running config to startup config (same as write file)\n")
|
"Copy running config to startup config (same as write file)\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return config_write (self, vty, argc, argv);
|
return config_write (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
/** -- **/
|
/** -- **/
|
||||||
@ -1378,7 +1374,6 @@ DEFUN (config_password,
|
|||||||
"Specifies a HIDDEN password will follow\n"
|
"Specifies a HIDDEN password will follow\n"
|
||||||
"The password string\n")
|
"The password string\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_8 = 1;
|
int idx_8 = 1;
|
||||||
int idx_word = 2;
|
int idx_word = 2;
|
||||||
if (argc == 3) // '8' was specified
|
if (argc == 3) // '8' was specified
|
||||||
@ -1425,9 +1420,9 @@ DEFUN (config_enable_password,
|
|||||||
"dummy string \n"
|
"dummy string \n"
|
||||||
"The HIDDEN 'enable' password string\n")
|
"The HIDDEN 'enable' password string\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_8 = 2;
|
int idx_8 = 2;
|
||||||
int idx_word = 3;
|
int idx_word = 3;
|
||||||
|
|
||||||
/* Crypt type is specified. */
|
/* Crypt type is specified. */
|
||||||
if (argc == 4)
|
if (argc == 4)
|
||||||
{
|
{
|
||||||
@ -1618,7 +1613,7 @@ DEFUN_HIDDEN (do_echo,
|
|||||||
{
|
{
|
||||||
char *message;
|
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);
|
VTY_NEWLINE);
|
||||||
if (message)
|
if (message)
|
||||||
XFREE(MTYPE_TMP, message);
|
XFREE(MTYPE_TMP, message);
|
||||||
@ -1632,15 +1627,15 @@ DEFUN (config_logmsg,
|
|||||||
LOG_LEVEL_DESC
|
LOG_LEVEL_DESC
|
||||||
"The message to send\n")
|
"The message to send\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_log_level = 1;
|
int idx_log_level = 1;
|
||||||
|
int idx_message = 2;
|
||||||
int level;
|
int level;
|
||||||
char *message;
|
char *message;
|
||||||
|
|
||||||
if ((level = level_match(argv[idx_log_level]->arg)) == ZLOG_DISABLED)
|
if ((level = level_match(argv[idx_log_level]->arg)) == ZLOG_DISABLED)
|
||||||
return CMD_ERR_NO_MATCH;
|
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)
|
if (message)
|
||||||
XFREE(MTYPE_TMP, message);
|
XFREE(MTYPE_TMP, message);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -1706,9 +1701,9 @@ DEFUN (config_log_stdout,
|
|||||||
"Set stdout logging level\n"
|
"Set stdout logging level\n"
|
||||||
LOG_LEVEL_DESC)
|
LOG_LEVEL_DESC)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_log_level = 2;
|
int idx_log_level = 2;
|
||||||
if (argc == 2)
|
|
||||||
|
if (argc == idx_log_level)
|
||||||
{
|
{
|
||||||
zlog_set_level (NULL, ZLOG_DEST_STDOUT, zlog_default->default_lvl);
|
zlog_set_level (NULL, ZLOG_DEST_STDOUT, zlog_default->default_lvl);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -1740,9 +1735,9 @@ DEFUN (config_log_monitor,
|
|||||||
"Set terminal line (monitor) logging level\n"
|
"Set terminal line (monitor) logging level\n"
|
||||||
LOG_LEVEL_DESC)
|
LOG_LEVEL_DESC)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_log_level = 2;
|
int idx_log_level = 2;
|
||||||
if (argc == 2)
|
|
||||||
|
if (argc == idx_log_level)
|
||||||
{
|
{
|
||||||
zlog_set_level (NULL, ZLOG_DEST_MONITOR, zlog_default->default_lvl);
|
zlog_set_level (NULL, ZLOG_DEST_MONITOR, zlog_default->default_lvl);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
@ -1829,7 +1824,6 @@ DEFUN (config_log_file,
|
|||||||
"Logging filename\n"
|
"Logging filename\n"
|
||||||
LOG_LEVEL_DESC)
|
LOG_LEVEL_DESC)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_filename = 2;
|
int idx_filename = 2;
|
||||||
int idx_log_levels = 3;
|
int idx_log_levels = 3;
|
||||||
if (argc == 4)
|
if (argc == 4)
|
||||||
@ -1870,7 +1864,6 @@ DEFUN (config_log_syslog,
|
|||||||
"Set syslog logging level\n"
|
"Set syslog logging level\n"
|
||||||
LOG_LEVEL_DESC)
|
LOG_LEVEL_DESC)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_log_levels = 2;
|
int idx_log_levels = 2;
|
||||||
if (argc == 3)
|
if (argc == 3)
|
||||||
{
|
{
|
||||||
|
10
lib/filter.c
10
lib/filter.c
@ -1480,8 +1480,8 @@ DEFUN (access_list_remark,
|
|||||||
"Access list entry comment\n"
|
"Access list entry comment\n"
|
||||||
"Comment up to 100 characters\n")
|
"Comment up to 100 characters\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_acl = 1;
|
int idx_acl = 1;
|
||||||
|
int idx_remark = 3;
|
||||||
struct access_list *access;
|
struct access_list *access;
|
||||||
|
|
||||||
access = access_list_get (AFI_IP, argv[idx_acl]->arg);
|
access = access_list_get (AFI_IP, argv[idx_acl]->arg);
|
||||||
@ -1491,7 +1491,7 @@ DEFUN (access_list_remark,
|
|||||||
XFREE (MTYPE_TMP, access->remark);
|
XFREE (MTYPE_TMP, access->remark);
|
||||||
access->remark = NULL;
|
access->remark = NULL;
|
||||||
}
|
}
|
||||||
access->remark = argv_concat(argv, argc, 1);
|
access->remark = argv_concat(argv, argc, idx_remark);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -1526,7 +1526,6 @@ DEFUN (no_access_list_remark_comment,
|
|||||||
"Access list entry comment\n"
|
"Access list entry comment\n"
|
||||||
"Comment up to 100 characters\n")
|
"Comment up to 100 characters\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return no_access_list_remark (self, vty, argc, argv);
|
return no_access_list_remark (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1675,8 +1674,8 @@ DEFUN (ipv6_access_list_remark,
|
|||||||
"Access list entry comment\n"
|
"Access list entry comment\n"
|
||||||
"Comment up to 100 characters\n")
|
"Comment up to 100 characters\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_word = 2;
|
int idx_word = 2;
|
||||||
|
int idx_line = 4;
|
||||||
struct access_list *access;
|
struct access_list *access;
|
||||||
|
|
||||||
access = access_list_get (AFI_IP6, argv[idx_word]->arg);
|
access = access_list_get (AFI_IP6, argv[idx_word]->arg);
|
||||||
@ -1686,7 +1685,7 @@ DEFUN (ipv6_access_list_remark,
|
|||||||
XFREE (MTYPE_TMP, access->remark);
|
XFREE (MTYPE_TMP, access->remark);
|
||||||
access->remark = NULL;
|
access->remark = NULL;
|
||||||
}
|
}
|
||||||
access->remark = argv_concat(argv, argc, 1);
|
access->remark = argv_concat(argv, argc, idx_line);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -1715,7 +1714,6 @@ DEFUN (no_ipv6_access_list_remark_comment,
|
|||||||
"Access list entry comment\n"
|
"Access list entry comment\n"
|
||||||
"Comment up to 100 characters\n")
|
"Comment up to 100 characters\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return no_ipv6_access_list_remark (self, vty, argc, argv);
|
return no_ipv6_access_list_remark (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,9 +57,9 @@ DEFUN (grammar_test,
|
|||||||
GRAMMAR_STR
|
GRAMMAR_STR
|
||||||
"command to pass to new parser\n")
|
"command to pass to new parser\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_command = 2;
|
||||||
// make a string from tokenized command line
|
// 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
|
// create cmd_element for parser
|
||||||
struct cmd_element *cmd = XCALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_element));
|
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"
|
"attempt to complete input on DFA\n"
|
||||||
"command to complete")
|
"command to complete")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_command = 2;
|
||||||
char *cmdstr = argv_concat (argv, argc, 0);
|
char *cmdstr = argv_concat (argv, argc, idx_command);
|
||||||
vector command = cmd_make_strvec (cmdstr);
|
vector command = cmd_make_strvec (cmdstr);
|
||||||
|
|
||||||
// generate completions of user input
|
// generate completions of user input
|
||||||
@ -131,11 +131,11 @@ DEFUN (grammar_test_match,
|
|||||||
"attempt to match input on DFA\n"
|
"attempt to match input on DFA\n"
|
||||||
"command to match")
|
"command to match")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_command = 2;
|
||||||
if (argv[0][0] == '#')
|
if (argv[0][0] == '#')
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
|
|
||||||
char *cmdstr = argv_concat(argv, argc, 0);
|
char *cmdstr = argv_concat(argv, argc, idx_command);
|
||||||
vector command = cmd_make_strvec (cmdstr);
|
vector command = cmd_make_strvec (cmdstr);
|
||||||
|
|
||||||
struct list *argvv = NULL;
|
struct list *argvv = NULL;
|
||||||
|
9
lib/if.c
9
lib/if.c
@ -677,16 +677,13 @@ DEFUN (interface_desc,
|
|||||||
"Interface specific description\n"
|
"Interface specific description\n"
|
||||||
"Characters describing this interface\n")
|
"Characters describing this interface\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_line = 1;
|
||||||
struct interface *ifp;
|
struct interface *ifp;
|
||||||
|
|
||||||
if (argc == 1)
|
|
||||||
return CMD_SUCCESS;
|
|
||||||
|
|
||||||
ifp = vty->index;
|
ifp = vty->index;
|
||||||
if (ifp->desc)
|
if (ifp->desc)
|
||||||
XFREE (MTYPE_TMP, 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;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -910,7 +907,7 @@ DEFUN (show_address,
|
|||||||
vrf_id_t vrf_id = VRF_DEFAULT;
|
vrf_id_t vrf_id = VRF_DEFAULT;
|
||||||
|
|
||||||
if (argc > 2)
|
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))
|
for (ALL_LIST_ELEMENTS_RO (vrf_iflist (vrf_id), node, ifp))
|
||||||
{
|
{
|
||||||
|
10
lib/plist.c
10
lib/plist.c
@ -1905,8 +1905,8 @@ DEFUN (ip_prefix_list_description,
|
|||||||
"Prefix-list specific description\n"
|
"Prefix-list specific description\n"
|
||||||
"Up to 80 characters describing this prefix-list\n")
|
"Up to 80 characters describing this prefix-list\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_word = 2;
|
int idx_word = 2;
|
||||||
|
int idx_line = 4;
|
||||||
struct prefix_list *plist;
|
struct prefix_list *plist;
|
||||||
|
|
||||||
plist = prefix_list_get (AFI_IP, 0, argv[idx_word]->arg);
|
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);
|
XFREE (MTYPE_TMP, plist->desc);
|
||||||
plist->desc = NULL;
|
plist->desc = NULL;
|
||||||
}
|
}
|
||||||
plist->desc = argv_concat(argv, argc, 1);
|
plist->desc = argv_concat(argv, argc, idx_line);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -1945,7 +1945,6 @@ DEFUN (no_ip_prefix_list_description_comment,
|
|||||||
"Prefix-list specific description\n"
|
"Prefix-list specific description\n"
|
||||||
"Up to 80 characters describing this prefix-list\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);
|
return no_ip_prefix_list_description (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2618,8 +2617,8 @@ DEFUN (ipv6_prefix_list_description,
|
|||||||
"Prefix-list specific description\n"
|
"Prefix-list specific description\n"
|
||||||
"Up to 80 characters describing this prefix-list\n")
|
"Up to 80 characters describing this prefix-list\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_word = 2;
|
int idx_word = 2;
|
||||||
|
int iddx_line = 4;
|
||||||
struct prefix_list *plist;
|
struct prefix_list *plist;
|
||||||
|
|
||||||
plist = prefix_list_get (AFI_IP6, 0, argv[idx_word]->arg);
|
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);
|
XFREE (MTYPE_TMP, plist->desc);
|
||||||
plist->desc = NULL;
|
plist->desc = NULL;
|
||||||
}
|
}
|
||||||
plist->desc = argv_concat(argv, argc, 1);
|
plist->desc = argv_concat(argv, argc, iddx_line);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -2658,7 +2657,6 @@ DEFUN (no_ipv6_prefix_list_description_comment,
|
|||||||
"Prefix-list specific description\n"
|
"Prefix-list specific description\n"
|
||||||
"Up to 80 characters describing this prefix-list\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);
|
return no_ipv6_prefix_list_description_comment (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1606,7 +1606,6 @@ DEFUN (rmap_continue,
|
|||||||
"Continue on a different entry within the route-map\n"
|
"Continue on a different entry within the route-map\n"
|
||||||
"Route-map entry sequence number\n")
|
"Route-map entry sequence number\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return rmap_onmatch_goto (self, vty, argc, argv);
|
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"
|
"Continue on a different entry within the route-map\n"
|
||||||
"Route-map entry sequence number\n")
|
"Route-map entry sequence number\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return no_rmap_onmatch_goto (self, vty, argc, argv);
|
return no_rmap_onmatch_goto (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1693,7 +1691,7 @@ DEFUN (rmap_description,
|
|||||||
"Route-map comment\n"
|
"Route-map comment\n"
|
||||||
"Comment describing this route-map rule\n")
|
"Comment describing this route-map rule\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
int idx_line = 1;
|
||||||
struct route_map_index *index;
|
struct route_map_index *index;
|
||||||
|
|
||||||
index = vty->index;
|
index = vty->index;
|
||||||
@ -1701,7 +1699,7 @@ DEFUN (rmap_description,
|
|||||||
{
|
{
|
||||||
if (index->description)
|
if (index->description)
|
||||||
XFREE (MTYPE_TMP, 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;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -2948,7 +2948,6 @@ DEFUN (no_terminal_monitor,
|
|||||||
"Set terminal line parameters\n"
|
"Set terminal line parameters\n"
|
||||||
"Copy debug output to the current terminal line\n")
|
"Copy debug output to the current terminal line\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
return terminal_no_monitor (self, vty, argc, argv);
|
return terminal_no_monitor (self, vty, argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -772,7 +772,6 @@ DEFUN (debug_ospf_packet,
|
|||||||
"Detail Information\n"
|
"Detail Information\n"
|
||||||
"Detail Information\n")
|
"Detail Information\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int inst = (argv[2]->type == RANGE_TKN) ? 1 : 0;
|
int inst = (argv[2]->type == RANGE_TKN) ? 1 : 0;
|
||||||
int detail = strmatch (argv[argc - 1]->text, "detail");
|
int detail = strmatch (argv[argc - 1]->text, "detail");
|
||||||
int send = strmatch (argv[argc - (1+detail)]->text, "send");
|
int send = strmatch (argv[argc - (1+detail)]->text, "send");
|
||||||
@ -850,7 +849,6 @@ DEFUN (no_debug_ospf_packet,
|
|||||||
"Detail Information\n"
|
"Detail Information\n"
|
||||||
"Detail Information\n")
|
"Detail Information\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int inst = (argv[3]->type == RANGE_TKN) ? 1 : 0;
|
int inst = (argv[3]->type == RANGE_TKN) ? 1 : 0;
|
||||||
int detail = strmatch (argv[argc - 1]->text, "detail");
|
int detail = strmatch (argv[argc - 1]->text, "detail");
|
||||||
int send = strmatch (argv[argc - (1+detail)]->text, "send");
|
int send = strmatch (argv[argc - (1+detail)]->text, "send");
|
||||||
@ -926,7 +924,6 @@ DEFUN (debug_ospf_ism,
|
|||||||
"ISM Event Information\n"
|
"ISM Event Information\n"
|
||||||
"ISM TImer Information\n")
|
"ISM TImer Information\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int inst = (argv[2]->type == RANGE_TKN);
|
int inst = (argv[2]->type == RANGE_TKN);
|
||||||
char *dbgparam = (argc == 4 + inst) ? argv[argc - 1]->text : NULL;
|
char *dbgparam = (argc == 4 + inst) ? argv[argc - 1]->text : NULL;
|
||||||
|
|
||||||
@ -980,7 +977,6 @@ DEFUN (no_debug_ospf_ism,
|
|||||||
"ISM Event Information\n"
|
"ISM Event Information\n"
|
||||||
"ISM TImer Information\n")
|
"ISM TImer Information\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int inst = (argv[3]->type == RANGE_TKN);
|
int inst = (argv[3]->type == RANGE_TKN);
|
||||||
char *dbgparam = (argc == 5 + inst) ? argv[argc - 1]->text : NULL;
|
char *dbgparam = (argc == 5 + inst) ? argv[argc - 1]->text : NULL;
|
||||||
|
|
||||||
|
@ -1182,7 +1182,6 @@ DEFUN (router_info,
|
|||||||
"Enable the Router Information functionality with Area flooding scope\n"
|
"Enable the Router Information functionality with Area flooding scope\n"
|
||||||
"OSPF area ID in IP format")
|
"OSPF area ID in IP format")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_ipv4 = 2;
|
int idx_ipv4 = 2;
|
||||||
char *area = (argc == 3) ? argv[idx_ipv4]->arg : NULL;
|
char *area = (argc == 3) ? argv[idx_ipv4]->arg : NULL;
|
||||||
|
|
||||||
|
@ -715,7 +715,6 @@ DEFUN (no_match_ip_nexthop,
|
|||||||
"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 ospf_route_match_delete (vty, vty->index, "ip next-hop", al);
|
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"
|
"Match entries of prefix-lists\n"
|
||||||
"IP prefix-list name\n")
|
"IP prefix-list name\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
char *pl = (argc == 6) ? argv[5]->arg : NULL;
|
char *pl = (argc == 6) ? argv[5]->arg : NULL;
|
||||||
return ospf_route_match_delete (vty, vty->index, "ip next-hop prefix-list", pl);
|
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 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 ospf_route_match_delete (vty, vty->index, "ip address", al);
|
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"
|
"Match entries of prefix-lists\n"
|
||||||
"IP prefix-list name\n")
|
"IP prefix-list name\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
char *pl = (argc == 6) ? argv[5]->arg : NULL;
|
char *pl = (argc == 6) ? argv[5]->arg : NULL;
|
||||||
return ospf_route_match_delete (vty, vty->index, "ip address prefix-list", pl);
|
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"
|
"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 ospf_route_match_delete (vty, vty->index, "interface", iface);
|
return ospf_route_match_delete (vty, vty->index, "interface", iface);
|
||||||
}
|
}
|
||||||
@ -853,7 +848,6 @@ DEFUN (no_match_tag,
|
|||||||
"Match tag of route\n"
|
"Match tag of route\n"
|
||||||
"Tag value\n")
|
"Tag value\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
char *tag = (argc == 4) ? argv[3]->arg : NULL;
|
char *tag = (argc == 4) ? argv[3]->arg : NULL;
|
||||||
return ospf_route_match_delete (vty, vty->index, "tag", tag);
|
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 for destination routing protocol\n"
|
||||||
"Metric value\n")
|
"Metric value\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
char *mval = (argc == 4) ? argv[3]->arg : NULL;
|
char *mval = (argc == 4) ? argv[3]->arg : NULL;
|
||||||
return ospf_route_set_delete (vty, vty->index, "metric", mval);
|
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 1 metric\n"
|
||||||
"OSPF[6] external type 2 metric\n")
|
"OSPF[6] external type 2 metric\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
char *ext = (argc == 4) ? argv[3]->text : NULL;
|
char *ext = (argc == 4) ? argv[3]->text : NULL;
|
||||||
return ospf_route_set_delete (vty, vty->index, "metric-type", ext);
|
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 for routing protocol\n"
|
||||||
"Tag value\n")
|
"Tag value\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
char *tag = (argc == 4) ? argv[3]->arg : NULL;
|
char *tag = (argc == 4) ? argv[3]->arg : NULL;
|
||||||
return ospf_route_set_delete (vty, vty->index, "tag", tag);
|
return ospf_route_set_delete (vty, vty->index, "tag", tag);
|
||||||
}
|
}
|
||||||
|
@ -4052,10 +4052,10 @@ DEFUN (test_igmp_receive_report,
|
|||||||
"Record type\n"
|
"Record type\n"
|
||||||
"Sources\n")
|
"Sources\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_number = 4;
|
int idx_number = 4;
|
||||||
int idx_ipv4 = 5;
|
int idx_ipv4 = 5;
|
||||||
int idx_number_2 = 6;
|
int idx_number_2 = 6;
|
||||||
|
int idx_line = 7;
|
||||||
char buf[1000];
|
char buf[1000];
|
||||||
char *igmp_msg;
|
char *igmp_msg;
|
||||||
struct ip *ip_hdr;
|
struct ip *ip_hdr;
|
||||||
@ -4121,7 +4121,7 @@ DEFUN (test_igmp_receive_report,
|
|||||||
/* Scan LINE sources */
|
/* Scan LINE sources */
|
||||||
sources = (struct in_addr *) (group_record + IGMP_V3_GROUP_RECORD_SOURCE_OFFSET);
|
sources = (struct in_addr *) (group_record + IGMP_V3_GROUP_RECORD_SOURCE_OFFSET);
|
||||||
src_addr = sources;
|
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;
|
src_str = argv[argi]->arg;
|
||||||
result = inet_pton(AF_INET, src_str, src_addr);
|
result = inet_pton(AF_INET, src_str, src_addr);
|
||||||
if (result <= 0) {
|
if (result <= 0) {
|
||||||
@ -4168,9 +4168,9 @@ DEFUN (test_pim_receive_dump,
|
|||||||
"Neighbor address\n"
|
"Neighbor address\n"
|
||||||
"Packet dump\n")
|
"Packet dump\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_interface = 4;
|
int idx_interface = 4;
|
||||||
int idx_ipv4 = 5;
|
int idx_ipv4 = 5;
|
||||||
|
int idx_line = 6;
|
||||||
uint8_t buf[1000];
|
uint8_t buf[1000];
|
||||||
uint8_t *pim_msg;
|
uint8_t *pim_msg;
|
||||||
struct ip *ip_hdr;
|
struct ip *ip_hdr;
|
||||||
@ -4219,7 +4219,7 @@ DEFUN (test_pim_receive_dump,
|
|||||||
pim_msg_size = 0;
|
pim_msg_size = 0;
|
||||||
|
|
||||||
/* Scan LINE dump into buffer */
|
/* Scan LINE dump into buffer */
|
||||||
for (argi = 2; argi < argc; ++argi) {
|
for (argi = idx_line; argi < argc; ++argi) {
|
||||||
const char *str = argv[argi]->arg;
|
const char *str = argv[argi]->arg;
|
||||||
int str_len = strlen(str);
|
int str_len = strlen(str);
|
||||||
int str_last = str_len - 1;
|
int str_last = str_len - 1;
|
||||||
@ -4289,7 +4289,6 @@ DEFUN (test_pim_receive_hello,
|
|||||||
"Neighbor LAN prune delay T-bit\n"
|
"Neighbor LAN prune delay T-bit\n"
|
||||||
"Neighbor secondary addresses\n")
|
"Neighbor secondary addresses\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int idx_interface = 4;
|
int idx_interface = 4;
|
||||||
int idx_ipv4 = 5;
|
int idx_ipv4 = 5;
|
||||||
int idx_number = 6;
|
int idx_number = 6;
|
||||||
@ -4298,6 +4297,7 @@ DEFUN (test_pim_receive_hello,
|
|||||||
int idx_number_4 = 9;
|
int idx_number_4 = 9;
|
||||||
int idx_number_5 = 10;
|
int idx_number_5 = 10;
|
||||||
int idx_number_6 = 11;
|
int idx_number_6 = 11;
|
||||||
|
int idx_line = 12;
|
||||||
uint8_t buf[1000];
|
uint8_t buf[1000];
|
||||||
uint8_t *pim_msg;
|
uint8_t *pim_msg;
|
||||||
struct ip *ip_hdr;
|
struct ip *ip_hdr;
|
||||||
@ -4359,7 +4359,7 @@ DEFUN (test_pim_receive_hello,
|
|||||||
pim_msg = buf + ip_hlen;
|
pim_msg = buf + ip_hlen;
|
||||||
|
|
||||||
/* Scan LINE addresses */
|
/* Scan LINE addresses */
|
||||||
for (argi = 8; argi < argc; ++argi) {
|
for (argi = idx_line; argi < argc; ++argi) {
|
||||||
const char *sec_str = argv[argi]->arg;
|
const char *sec_str = argv[argi]->arg;
|
||||||
struct in_addr sec_addr;
|
struct in_addr sec_addr;
|
||||||
result = inet_pton(AF_INET, sec_str, &sec_addr);
|
result = inet_pton(AF_INET, sec_str, &sec_addr);
|
||||||
|
@ -1342,7 +1342,6 @@ DEFUN (ipv6_nd_prefix,
|
|||||||
"Do not use prefix for autoconfiguration\n"
|
"Do not use prefix for autoconfiguration\n"
|
||||||
"Do not use prefix for onlink determination\n")
|
"Do not use prefix for onlink determination\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
/* prelude */
|
/* prelude */
|
||||||
char *prefix = argv[3]->arg;
|
char *prefix = argv[3]->arg;
|
||||||
int lifetimes = (argc > 4) && (argv[4]->type == RANGE_TKN || strmatch (argv[4]->text, "infinite"));
|
int lifetimes = (argc > 4) && (argv[4]->type == RANGE_TKN || strmatch (argv[4]->text, "infinite"));
|
||||||
|
@ -1235,7 +1235,6 @@ DEFUN (show_ip_route_vrf,
|
|||||||
VRF_CMD_HELP_STR)
|
VRF_CMD_HELP_STR)
|
||||||
{
|
{
|
||||||
int idx_vrf = 4;
|
int idx_vrf = 4;
|
||||||
int idx_json = 5;
|
|
||||||
u_char uj = use_json(argc, argv);
|
u_char uj = use_json(argc, argv);
|
||||||
|
|
||||||
return do_show_ip_route (vty, argv[idx_vrf]->arg, SAFI_UNICAST, uj);
|
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
|
VRF_CMD_HELP_STR
|
||||||
"Output JSON\n")
|
"Output JSON\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
struct route_table *table;
|
struct route_table *table;
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
struct rib *rib;
|
struct rib *rib;
|
||||||
@ -2954,7 +2952,6 @@ DEFUN (show_ipv6_route_protocol,
|
|||||||
VRF_CMD_HELP_STR
|
VRF_CMD_HELP_STR
|
||||||
QUAGGA_IP6_REDIST_HELP_STR_ZEBRA)
|
QUAGGA_IP6_REDIST_HELP_STR_ZEBRA)
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
int type;
|
int type;
|
||||||
struct route_table *table;
|
struct route_table *table;
|
||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
@ -3699,7 +3696,6 @@ DEFUN (ip_zebra_import_table_distance,
|
|||||||
"route-map for filtering\n"
|
"route-map for filtering\n"
|
||||||
"route-map name\n")
|
"route-map name\n")
|
||||||
{
|
{
|
||||||
/* CHECK ME argc referenced below */
|
|
||||||
u_int32_t table_id = 0;
|
u_int32_t table_id = 0;
|
||||||
|
|
||||||
VTY_GET_INTEGER("table", table_id, argv[2]->arg);
|
VTY_GET_INTEGER("table", table_id, argv[2]->arg);
|
||||||
|
Loading…
Reference in New Issue
Block a user