From 69fe4b9eb6f438951e9e31c8b5f159a1b643307e Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Tue, 31 Dec 2019 11:57:09 +0100 Subject: [PATCH] yacc.c: avoid negations * data/skeletons/yacc.c (yyerrlab): here. --- data/skeletons/yacc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/skeletons/yacc.c b/data/skeletons/yacc.c index 1f16a733..242cca4a 100644 --- a/data/skeletons/yacc.c +++ b/data/skeletons/yacc.c @@ -1769,17 +1769,17 @@ yyerrlab: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (!yymsg) + if (yymsg) + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + else { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } } yyerror (]b4_yyerror_args[yymsgp); if (yysyntax_error_status == 2)