]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(sexp_check_token): Removed check for "any" token.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 27 Aug 2008 08:48:59 +0000 (10:48 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 27 Aug 2008 08:48:59 +0000 (10:48 +0200)
All callers specify the token they expect.
(sexp_parse): Pass on comment tokens.

Rev: nettle/tools/parse.c:1.2

tools/parse.c

index f48d257831fdab08589cb5f113b1e14d9552e1d9..292c6ce8bae486f90702777abe82758a4543655c 100644 (file)
@@ -72,7 +72,7 @@ sexp_check_token(struct sexp_parser *parser,
                 parser->transport ? SEXP_CANONICAL : parser->mode,
                 string);
 
-  if (token && parser->input->token != token)
+  if (parser->input->token != token)
     die("Syntax error.\n");
 }
 
@@ -141,6 +141,10 @@ sexp_parse(struct sexp_parser *parser,
          token->type = SEXP_STRING;
          goto check_transport_end;
 
+       case SEXP_COMMENT:
+         token->type = SEXP_COMMENT;
+         return;
+
        case SEXP_TRANSPORT_START:
          if (parser->mode == SEXP_CANONICAL)
            die("Base64 not allowed in canonical mode.\n");