mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
yacc.c: avoid negated if
* data/skeletons/yacc.c: Prefer a "direct" conditional.
This commit is contained in:
@@ -1183,10 +1183,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|||||||
yyarg[yycount++] = yytname[yyx];
|
yyarg[yycount++] = yytname[yyx];
|
||||||
{
|
{
|
||||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
|
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
|
||||||
if (! (yysize <= yysize1
|
if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
|
||||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
yysize = yysize1;
|
||||||
|
else
|
||||||
return 2;
|
return 2;
|
||||||
yysize = yysize1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]b4_lac_if([[
|
}]b4_lac_if([[
|
||||||
@@ -1214,9 +1214,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|||||||
|
|
||||||
{
|
{
|
||||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
|
||||||
|
yysize = yysize1;
|
||||||
|
else
|
||||||
return 2;
|
return 2;
|
||||||
yysize = yysize1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*yymsg_alloc < yysize)
|
if (*yymsg_alloc < yysize)
|
||||||
|
|||||||
@@ -1800,10 +1800,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|||||||
yyarg[yycount++] = yytname[yyx];
|
yyarg[yycount++] = yytname[yyx];
|
||||||
{
|
{
|
||||||
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
|
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
|
||||||
if (! (yysize <= yysize1
|
if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
|
||||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
yysize = yysize1;
|
||||||
|
else
|
||||||
return 2;
|
return 2;
|
||||||
yysize = yysize1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1831,9 +1831,10 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
|||||||
|
|
||||||
{
|
{
|
||||||
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
|
||||||
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
|
||||||
|
yysize = yysize1;
|
||||||
|
else
|
||||||
return 2;
|
return 2;
|
||||||
yysize = yysize1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*yymsg_alloc < yysize)
|
if (*yymsg_alloc < yysize)
|
||||||
|
|||||||
Reference in New Issue
Block a user