From b87c0c3cf0281f5a18dc6641bfd62fa585fafdc3 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Thu, 22 Sep 2016 18:26:11 +0000 Subject: [PATCH] lib: Remove last remnants of NUMBER_TKN...again Signed-off-by: Quentin Young --- lib/command_match.c | 16 ---------------- 1 file changed, 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:" -- 2.39.5