summaryrefslogtreecommitdiff
path: root/ospf6d
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2017-06-29 11:06:15 -0400
committerGitHub <noreply@github.com>2017-06-29 11:06:15 -0400
commit0bc44f61c942bc606c66407f4dfeca6e7b724abc (patch)
tree8228d692f1ef64c6ceea6cb1dec30e363f162082 /ospf6d
parent0eef52fd9503ccefb61e27e0e928ebf3d346a66e (diff)
parent55f91488121370cbfe9ccb610d91c28192b69923 (diff)
Merge pull request #754 from qlyoung/fix-argv-arg
use argv->text where appropriate
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_lsa.c12
-rw-r--r--ospf6d/ospf6_route.c16
2 files changed, 14 insertions, 14 deletions
diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c
index acc8fe3804..624acb9c69 100644
--- a/ospf6d/ospf6_lsa.c
+++ b/ospf6d/ospf6_lsa.c
@@ -850,11 +850,11 @@ DEFUN (debug_ospf6_lsa_type,
if (argc == 5)
{
- if (! strcmp (argv[idx_type]->text, "originate"))
+ if (strmatch(argv[idx_type]->text, "originate"))
SET_FLAG (handler->debug, OSPF6_LSA_DEBUG_ORIGINATE);
- else if (! strcmp (argv[idx_type]->text, "examine"))
+ else if (strmatch(argv[idx_type]->text, "examine"))
SET_FLAG (handler->debug, OSPF6_LSA_DEBUG_EXAMIN);
- else if (! strcmp (argv[idx_type]->text, "flooding"))
+ else if (strmatch(argv[idx_type]->text, "flooding"))
SET_FLAG (handler->debug, OSPF6_LSA_DEBUG_FLOOD);
}
else
@@ -903,11 +903,11 @@ DEFUN (no_debug_ospf6_lsa_type,
if (argc == 6)
{
- if (! strcmp (argv[idx_type]->text, "originate"))
+ if (strmatch(argv[idx_type]->text, "originate"))
UNSET_FLAG (handler->debug, OSPF6_LSA_DEBUG_ORIGINATE);
- if (! strcmp (argv[idx_type]->text, "examine"))
+ if (strmatch(argv[idx_type]->text, "examine"))
UNSET_FLAG (handler->debug, OSPF6_LSA_DEBUG_EXAMIN);
- if (! strcmp (argv[idx_type]->text, "flooding"))
+ if (strmatch(argv[idx_type]->text, "flooding"))
UNSET_FLAG (handler->debug, OSPF6_LSA_DEBUG_FLOOD);
}
else
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 117f7af6ee..a6bb099ddd 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -1313,43 +1313,43 @@ ospf6_route_table_show (struct vty *vty, int argc_start, int argc, struct cmd_to
for (i = argc_start; i < argc; i++)
{
- if (! strcmp (argv[i]->arg, "summary"))
+ if (strmatch(argv[i]->text, "summary"))
{
summary++;
continue;
}
- if (! strcmp (argv[i]->arg, "intra-area"))
+ if (strmatch(argv[i]->text, "intra-area"))
{
type = OSPF6_PATH_TYPE_INTRA;
continue;
}
- if (! strcmp (argv[i]->arg, "inter-area"))
+ if (strmatch(argv[i]->text, "inter-area"))
{
type = OSPF6_PATH_TYPE_INTER;
continue;
}
- if (! strcmp (argv[i]->arg, "external-1"))
+ if (strmatch(argv[i]->text, "external-1"))
{
type = OSPF6_PATH_TYPE_EXTERNAL1;
continue;
}
- if (! strcmp (argv[i]->arg, "external-2"))
+ if (strmatch(argv[i]->text, "external-2"))
{
type = OSPF6_PATH_TYPE_EXTERNAL2;
continue;
}
- if (! strcmp (argv[i]->arg, "detail"))
+ if (strmatch(argv[i]->text, "detail"))
{
detail++;
continue;
}
- if (! strcmp (argv[i]->arg, "match"))
+ if (strmatch(argv[i]->text, "match"))
{
match++;
continue;
@@ -1488,7 +1488,7 @@ ospf6_linkstate_table_show (struct vty *vty, int idx_ipv4, int argc,
for (i = idx_ipv4; i < argc; i++)
{
- if (! strcmp (argv[i]->arg, "detail"))
+ if (strmatch(argv[i]->text, "detail"))
{
detail++;
continue;