Skip to contentSkip to conversation

parser_bison: Use __error() to avoid syntax error message duplication

PATCH New Elise Lennion 1 participant 1 message Nov 16, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/2 parser_bison: Use __error() to avoid syntax error message duplication

Calls to erec_queue() from yyerror() already have "syntax error" in the body of the message, then __error() must be used.

---
v3: Separate changes in different patches

 src/parser_bison.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/parser_bison.y +1 -1
index 91955c1..58385fa 100644
@@ -47,7 +47,7 @@ void parser_init(struct parser_state *state, struct list_head *msgs)
 static void yyerror(struct location *loc, void *scanner,
 		    struct parser_state *state, const char *s)
 {
-	erec_queue(error(loc, "%s", s), state->msgs);
+	erec_queue(__error(loc, "%s", s), state->msgs);
 }
 
 static struct scope *current_scope(const struct parser_state *state)
Signature · 1 line
2.7.4