diff options
-rw-r--r-- | bgpd/bgp_evpn_vty.c | 16 | ||||
-rw-r--r-- | ospf6d/ospf6_route.c | 16 | ||||
-rw-r--r-- | ripd/rip_debug.c | 16 | ||||
-rw-r--r-- | ripngd/ripng_debug.c | 16 |
4 files changed, 24 insertions, 40 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c index 145890846..07b86c05d 100644 --- a/bgpd/bgp_evpn_vty.c +++ b/bgpd/bgp_evpn_vty.c @@ -3102,11 +3102,11 @@ DEFUN (bgp_evpn_vni_rt, if (!bgp || !vpn) return CMD_WARNING; - if (!strcmp(argv[1]->arg, "import")) + if (!strcmp(argv[1]->text, "import")) rt_type = RT_TYPE_IMPORT; - else if (!strcmp(argv[1]->arg, "export")) + else if (!strcmp(argv[1]->text, "export")) rt_type = RT_TYPE_EXPORT; - else if (!strcmp(argv[1]->arg, "both")) + else if (!strcmp(argv[1]->text, "both")) rt_type = RT_TYPE_BOTH; else { vty_out(vty, "%% Invalid Route Target type\n"); @@ -3164,11 +3164,11 @@ DEFUN (no_bgp_evpn_vni_rt, if (!bgp || !vpn) return CMD_WARNING; - if (!strcmp(argv[2]->arg, "import")) + if (!strcmp(argv[2]->text, "import")) rt_type = RT_TYPE_IMPORT; - else if (!strcmp(argv[2]->arg, "export")) + else if (!strcmp(argv[2]->text, "export")) rt_type = RT_TYPE_EXPORT; - else if (!strcmp(argv[2]->arg, "both")) + else if (!strcmp(argv[2]->text, "both")) rt_type = RT_TYPE_BOTH; else { vty_out(vty, "%% Invalid Route Target type\n"); @@ -3257,9 +3257,9 @@ DEFUN (no_bgp_evpn_vni_rt_without_val, if (!bgp || !vpn) return CMD_WARNING; - if (!strcmp(argv[2]->arg, "import")) { + if (!strcmp(argv[2]->text, "import")) { rt_type = RT_TYPE_IMPORT; - } else if (!strcmp(argv[2]->arg, "export")) { + } else if (!strcmp(argv[2]->text, "export")) { rt_type = RT_TYPE_EXPORT; } else { vty_out(vty, "%% Invalid Route Target type\n"); 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; diff --git a/ripd/rip_debug.c b/ripd/rip_debug.c index 56ba8e7f3..2ce289e38 100644 --- a/ripd/rip_debug.c +++ b/ripd/rip_debug.c @@ -93,13 +93,9 @@ DEFUN (debug_rip_packet_direct, { int idx_recv_send = 3; rip_debug_packet |= RIP_DEBUG_PACKET; - if (strncmp("send", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) + if (strcmp("send", argv[idx_recv_send]->text) == 0) rip_debug_packet |= RIP_DEBUG_SEND; - if (strncmp("recv", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) + if (strcmp("recv", argv[idx_recv_send]->text) == 0) rip_debug_packet |= RIP_DEBUG_RECV; return CMD_SUCCESS; } @@ -150,16 +146,12 @@ DEFUN (no_debug_rip_packet_direct, "RIP option set for send packet\n") { int idx_recv_send = 4; - if (strncmp("send", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) { + if (strcmp("send", argv[idx_recv_send]->text) == 0) { if (IS_RIP_DEBUG_RECV) rip_debug_packet &= ~RIP_DEBUG_SEND; else rip_debug_packet = 0; - } else if (strncmp("recv", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) { + } else if (strcmp("recv", argv[idx_recv_send]->text) == 0) { if (IS_RIP_DEBUG_SEND) rip_debug_packet &= ~RIP_DEBUG_RECV; else diff --git a/ripngd/ripng_debug.c b/ripngd/ripng_debug.c index 9ebc302b1..c8cad23ad 100644 --- a/ripngd/ripng_debug.c +++ b/ripngd/ripng_debug.c @@ -94,13 +94,9 @@ DEFUN (debug_ripng_packet_direct, { int idx_recv_send = 3; ripng_debug_packet |= RIPNG_DEBUG_PACKET; - if (strncmp("send", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) + if (strcmp("send", argv[idx_recv_send]->text) == 0) ripng_debug_packet |= RIPNG_DEBUG_SEND; - if (strncmp("recv", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) + if (strcmp("recv", argv[idx_recv_send]->text) == 0) ripng_debug_packet |= RIPNG_DEBUG_RECV; return CMD_SUCCESS; @@ -152,16 +148,12 @@ DEFUN (no_debug_ripng_packet_direct, "Debug option set for send packet\n") { int idx_recv_send = 4; - if (strncmp("send", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) { + if (strcmp("send", argv[idx_recv_send]->text) == 0) { if (IS_RIPNG_DEBUG_RECV) ripng_debug_packet &= ~RIPNG_DEBUG_SEND; else ripng_debug_packet = 0; - } else if (strncmp("recv", argv[idx_recv_send]->arg, - strlen(argv[idx_recv_send]->arg)) - == 0) { + } else if (strcmp("recv", argv[idx_recv_send]->text) == 0) { if (IS_RIPNG_DEBUG_SEND) ripng_debug_packet &= ~RIPNG_DEBUG_RECV; else |