]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: allow all characters in WORD tokens
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 18 Nov 2016 10:34:28 +0000 (11:34 +0100)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 29 Nov 2016 20:35:19 +0000 (20:35 +0000)
WORD tokens (which are also used for "LINE..." input) should really
accept all characters.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/command_match.c

index 06a50656b607bc300184c45174708afb699cef1e..93f898da7bc8f73ccd9246dcec2e42a5b611d75f 100644 (file)
@@ -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;
 }