diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-22 18:26:11 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-22 18:26:11 +0000 |
| commit | b87c0c3cf0281f5a18dc6641bfd62fa585fafdc3 (patch) | |
| tree | a0132f0d7b8efa12f36f1b928639349f437e9e61 /lib/command_match.c | |
| parent | 5c307a08f2508b04f7ca27cb7b3c151656f54a29 (diff) | |
lib: Remove last remnants of NUMBER_TKN...again
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_match.c')
| -rw-r--r-- | lib/command_match.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/command_match.c b/lib/command_match.c index 65a5baa9ec..03efa93e04 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -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:" |
