From: David Lamparter Date: Fri, 18 Nov 2016 10:34:28 +0000 (+0100) Subject: lib: allow all characters in WORD tokens X-Git-Tag: frr-3.0-branchpoint~133^2~6 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8af5502876b9e6e0701f51ccdd2c708e6a971197;p=mirror%2Ffrr.git lib: allow all characters in WORD tokens WORD tokens (which are also used for "LINE..." input) should really accept all characters. Signed-off-by: David Lamparter --- diff --git a/lib/command_match.c b/lib/command_match.c index 06a50656b6..93f898da7b 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -855,14 +855,9 @@ match_word (struct cmd_token *token, const char *word) return no_match; } -#define VARIABLE_ALPHABET \ -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890:/._-" - static enum match_type match_variable (struct cmd_token *token, const char *word) { assert (token->type == VARIABLE_TKN); - - return strlen (word) == strspn(word, VARIABLE_ALPHABET) ? - exact_match : no_match; + return exact_match; }