[quagga-dev,15623] lib: Clean command.c

Message ID 1466090804-15510-1-git-send-email-qlyoung@cumulusnetworks.com
State Under Review
Headers show

Commit Message

Quentin Young June 16, 2016, 3:26 p.m.
Removed dead code paths and fixed a typo.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
---
 lib/command.c | 69 +----------------------------------------------------------
 1 file changed, 1 insertion(+), 68 deletions(-)

Comments

cisystem@netdef.org June 16, 2016, 5 p.m. | #1
Continous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF CI System <cisystem@netdef.org>

This is an EXPERIMENTAL automated CI system.
For questions and feedback, feel free to email
Martin Winter <mwinter@opensourcerouting.org>.

Patches applied :
  Patchwork 2003: http://patchwork.quagga.net/patch/2003
       [quagga-dev,15623] lib: Clean command.c
Tested on top of Git : 5f67888 (as of 20160429.234845 UTC)
CI System Testrun URL: https://ci1.netdef.org/browse/QUAGGA-QPWORK-316/


Regards,
  NetDEF/OpenSourceRouting Continous Integration (CI) System

---
OpenSourceRouting.org is a project of the Network Device Education Foundation,
For more information, see www.netdef.org and www.opensourcerouting.org
For questions in regards to this CI System, contact Martin Winter, mwinter@netdef.org

Patch hide | download patch | download mbox

diff --git a/lib/command.c b/lib/command.c
index 8089360..b9259e2 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -428,7 +428,7 @@  format_parser_end_multiple(struct format_parser_state *state)
   char *dummy;
 
   if (!state->in_multiple)
-    format_parser_error(state, "Unepexted ')'");
+    format_parser_error(state, "Unexpected ')'");
 
   if (vector_active(state->curvect) == 0)
     format_parser_error(state, "Empty multiple section");
@@ -753,54 +753,6 @@  cmd_node_vector (vector v, enum node_type ntype)
   return cnode->cmd_vector;
 }
 
-#if 0
-/* Filter command vector by symbol.  This function is not actually used;
- * should it be deleted? */
-static int
-cmd_filter_by_symbol (char *command, char *symbol)
-{
-  int i, lim;
-
-  if (strcmp (symbol, "IPV4_ADDRESS") == 0)
-    {
-      i = 0;
-      lim = strlen (command);
-      while (i < lim)
-	{
-	  if (! (isdigit ((int) command[i]) || command[i] == '.' || command[i] == '/'))
-	    return 1;
-	  i++;
-	}
-      return 0;
-    }
-  if (strcmp (symbol, "STRING") == 0)
-    {
-      i = 0;
-      lim = strlen (command);
-      while (i < lim)
-	{
-	  if (! (isalpha ((int) command[i]) || command[i] == '_' || command[i] == '-'))
-	    return 1;
-	  i++;
-	}
-      return 0;
-    }
-  if (strcmp (symbol, "IFNAME") == 0)
-    {
-      i = 0;
-      lim = strlen (command);
-      while (i < lim)
-	{
-	  if (! isalnum ((int) command[i]))
-	    return 1;
-	  i++;
-	}
-      return 0;
-    }
-  return 0;
-}
-#endif
-
 /* Completion match types. */
 enum match_type 
 {
@@ -1113,14 +1065,6 @@  cmd_ipv6_prefix_match (const char *str)
   if (mask < 0 || mask > 128)
     return no_match;
   
-/* I don't know why mask < 13 makes command match partly.
-   Forgive me to make this comments. I Want to set static default route
-   because of lack of function to originate default in ospf6d; sorry
-       yasu
-  if (mask < 13)
-    return partly_match;
-*/
-
   return exact_match;
 }
 
@@ -2426,15 +2370,6 @@  cmd_complete_command_real (vector vline, struct vty *vty, int *status, int islib
 	  *status = CMD_ERR_AMBIGUOUS;
 	  return NULL;
 	}
-      /*
-	   else if (ret == 2)
-	   {
-	   vector_free (cmd_vector);
-	   cmd_matches_free(&matches);
-	   *status = CMD_ERR_NO_MATCH;
-	   return NULL;
-	   }
-	 */
     }
   
   /* Prepare match vector. */
@@ -2506,8 +2441,6 @@  cmd_complete_command_real (vector vline, struct vty *vty, int *status, int islib
 	      memcpy (lcdstr, matchvec->index[0], lcd);
 	      lcdstr[lcd] = '\0';
 
-	      /* match_str = (char **) &lcdstr; */
-
 	      /* Free matchvec. */
 	      for (i = 0; i < vector_active (matchvec); i++)
                 {