From 3d74850a2fcb755350d3f6efe4195704e872a294 Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Mon, 25 May 2026 00:11:51 -0500 Subject: parser: Use 'res' instead of 'tok' indirection Signed-off-by: Chloe M. --- core/parser.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/parser.c b/core/parser.c index b4f5696..a438b74 100644 --- a/core/parser.c +++ b/core/parser.c @@ -90,8 +90,6 @@ preprocessor_push(struct tokbuf *tokbuf, struct token *tok) static int parser_nom(struct cescal_state *state, struct token *res) { - struct token tok; - if (state == NULL || res == NULL) { errno = EINVAL; return -1; @@ -99,17 +97,17 @@ parser_nom(struct cescal_state *state, struct token *res) switch (state->pass) { case 0: /* Pre-processor */ - if (lexer_nom(state, &tok) < 0) { + if (lexer_nom(state, res) < 0) { return -1; } - if (preprocessor_push(&state->tokbuf, &tok) < 0) { + if (preprocessor_push(state, &state->tokbuf, res) < 0) { return -1; } break; case 1: /* Parse */ - if (tokbuf_pop(&state->tokbuf, &tok) < 0) { + if (tokbuf_pop(&state->tokbuf, res) < 0) { return -1; } -- cgit v1.2.3