]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: Remove last remnants of NUMBER_TKN...again
authorQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 22 Sep 2016 18:26:11 +0000 (18:26 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Thu, 22 Sep 2016 18:26:11 +0000 (18:26 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
lib/command_match.c

index 65a5baa9ecc8a54ee9d2de3ac6d86833cc5e3a3e..03efa93e045131a94b9940efab9d3c41810cbede 100644 (file)
@@ -418,8 +418,6 @@ score_precedence (enum cmd_token_type type)
       case IPV4_PREFIX_TKN:
       case IPV6_TKN:
       case IPV6_PREFIX_TKN:
-      case NUMBER_TKN:
-        return 1;
       case RANGE_TKN:
         return 2;
       case WORD_TKN:
@@ -544,8 +542,6 @@ match_token (struct cmd_token *token, char *input_token)
       return match_ipv6_prefix (input_token);
     case RANGE_TKN:
       return match_range (token, input_token);
-    case NUMBER_TKN:
-      return match_number (token, input_token);
     case VARIABLE_TKN:
       return match_variable (token, input_token);
     case END_TKN:
@@ -805,18 +801,6 @@ match_word (struct cmd_token *token, const char *word)
   return no_match;
 }
 
-static enum match_type
-match_number (struct cmd_token *token, const char *word)
-{
-  assert (token->type == NUMBER_TKN);
-
-  if (!strcmp ("\0", word)) return no_match;
-  char *endptr;
-  long long num = strtoll (word, &endptr, 10);
-  if (endptr != '\0') return no_match;
-  return num == token->value ? exact_match : no_match;
-}
-
 #define VARIABLE_ALPHABET \
 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890:"