diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-10-06 03:31:54 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-10-06 03:54:42 +0200 |
commit | 8034beff9f153e265040b94a355c1057d56d59f0 (patch) | |
tree | 5005743e8a9428c0535b875bfd4181b0d40d6d28 /ospf6d/ospf6_route.c | |
parent | lib, ldpd: fix "argument cannot be negative" coverity warnings (diff) | |
download | frr-8034beff9f153e265040b94a355c1057d56d59f0.tar.xz frr-8034beff9f153e265040b94a355c1057d56d59f0.zip |
*: use argv[]->text instead of argv[]->arg when appropriate
Incomplete commands like "debug ospf6 route mem" were being ignored. The
changes in ripd and ripngd are intended to make the code easier to read,
no bugs were fixed in these two daemons.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_route.c')
-rw-r--r-- | ospf6d/ospf6_route.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 724258d2f..5b78dda68 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -1469,13 +1469,13 @@ DEFUN (debug_ospf6_route, int idx_type = 3; unsigned char level = 0; - if (!strncmp(argv[idx_type]->arg, "table", 5)) + if (!strcmp(argv[idx_type]->text, "table")) level = OSPF6_DEBUG_ROUTE_TABLE; - else if (!strncmp(argv[idx_type]->arg, "intra", 5)) + else if (!strcmp(argv[idx_type]->text, "intra-area")) level = OSPF6_DEBUG_ROUTE_INTRA; - else if (!strncmp(argv[idx_type]->arg, "inter", 5)) + else if (!strcmp(argv[idx_type]->text, "inter-area")) level = OSPF6_DEBUG_ROUTE_INTER; - else if (!strncmp(argv[idx_type]->arg, "memor", 5)) + else if (!strcmp(argv[idx_type]->text, "memory")) level = OSPF6_DEBUG_ROUTE_MEMORY; OSPF6_DEBUG_ROUTE_ON(level); return CMD_SUCCESS; @@ -1496,13 +1496,13 @@ DEFUN (no_debug_ospf6_route, int idx_type = 4; unsigned char level = 0; - if (!strncmp(argv[idx_type]->arg, "table", 5)) + if (!strcmp(argv[idx_type]->text, "table")) level = OSPF6_DEBUG_ROUTE_TABLE; - else if (!strncmp(argv[idx_type]->arg, "intra", 5)) + else if (!strcmp(argv[idx_type]->text, "intra-area")) level = OSPF6_DEBUG_ROUTE_INTRA; - else if (!strncmp(argv[idx_type]->arg, "inter", 5)) + else if (!strcmp(argv[idx_type]->text, "inter-area")) level = OSPF6_DEBUG_ROUTE_INTER; - else if (!strncmp(argv[idx_type]->arg, "memor", 5)) + else if (!strcmp(argv[idx_type]->text, "memory")) level = OSPF6_DEBUG_ROUTE_MEMORY; OSPF6_DEBUG_ROUTE_OFF(level); return CMD_SUCCESS; |