diff options
| author | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-09-30 01:27:05 +0000 |
|---|---|---|
| committer | Daniel Walton <dwalton@cumulusnetworks.com> | 2016-09-30 01:27:05 +0000 |
| commit | 1d68dbfe66479d81a570d8d4aa2d0f0d7ba57184 (patch) | |
| tree | 86e24c95b6a508cdf97bdabac318d4e5e017418e /ospf6d/ospf6_zebra.c | |
| parent | 58749582a9a2c5930d907d88a3ad0d0c5c24f627 (diff) | |
ospf6d: scrubbed some argc CHECK MEs
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_zebra.c')
| -rw-r--r-- | ospf6d/ospf6_zebra.c | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index 44d1bbfaf8..ded8041cb7 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -707,18 +707,9 @@ ospf6_zebra_init (struct thread_master *master) /* Debug */ -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "debug ospf6 zebra", - * DEBUG_STR - * OSPF6_STR - * "Debug connection between zebra\n" - * - * - */ DEFUN (debug_ospf6_zebra_sendrecv, debug_ospf6_zebra_sendrecv_cmd, - "debug ospf6 zebra <send|recv>", + "debug ospf6 zebra [<send|recv>]", DEBUG_STR OSPF6_STR "Debug connection between zebra\n" @@ -726,15 +717,14 @@ DEFUN (debug_ospf6_zebra_sendrecv, "Debug Receiving zebra\n" ) { - /* CHECK ME argc referenced below */ int idx_send_recv = 3; unsigned char level = 0; - if (argc) + if (argc == 4) { - if (! strncmp (argv[idx_send_recv]->arg, "s", 1)) + if (strmatch(argv[idx_send_recv]->text, "send")) level = OSPF6_DEBUG_ZEBRA_SEND; - else if (! strncmp (argv[idx_send_recv]->arg, "r", 1)) + else if (strmatch(argv[idx_send_recv]->text, "recv")) level = OSPF6_DEBUG_ZEBRA_RECV; } else @@ -744,21 +734,9 @@ DEFUN (debug_ospf6_zebra_sendrecv, return CMD_SUCCESS; } - - -/* - * CHECK ME - The following ALIASes need to be implemented in this DEFUN - * "no debug ospf6 zebra", - * NO_STR - * DEBUG_STR - * OSPF6_STR - * "Debug connection between zebra\n" - * - * - */ DEFUN (no_debug_ospf6_zebra_sendrecv, no_debug_ospf6_zebra_sendrecv_cmd, - "no debug ospf6 zebra <send|recv>", + "no debug ospf6 zebra [<send|recv>]", NO_STR DEBUG_STR OSPF6_STR @@ -767,15 +745,14 @@ DEFUN (no_debug_ospf6_zebra_sendrecv, "Debug Receiving zebra\n" ) { - /* CHECK ME argc referenced below */ int idx_send_recv = 4; unsigned char level = 0; - if (argc) + if (argc == 5) { - if (! strncmp (argv[idx_send_recv]->arg, "s", 1)) + if (strmatch(argv[idx_send_recv]->text, "send")) level = OSPF6_DEBUG_ZEBRA_SEND; - else if (! strncmp (argv[idx_send_recv]->arg, "r", 1)) + else if (strmatch(argv[idx_send_recv]->text, "recv")) level = OSPF6_DEBUG_ZEBRA_RECV; } else |
