From d240d71bef5bff278f8ad2e66b169bf39b70c2ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Wed, 27 Aug 2008 10:48:59 +0200 Subject: [PATCH] (sexp_check_token): Removed check for "any" token. All callers specify the token they expect. (sexp_parse): Pass on comment tokens. Rev: nettle/tools/parse.c:1.2 --- tools/parse.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/parse.c b/tools/parse.c index f48d2578..292c6ce8 100644 --- a/tools/parse.c +++ b/tools/parse.c @@ -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"); -- GitLab