maint: avoid "magic number exit".

* cfg.mk (local-checks-to-skip): No longer skip it.
	* bootstrap.conf (gnulib_modules): Add sysexits.
	* doc/bison.texinfo, etc/bench.pl.in, src/parse-gram.y,
	* src/system.h, tests/calc.at, tests/named-refs.at: Use assert
	where appropriate instead of "if (...) exit".
	Use symbolic exit status elsewhere.
This commit is contained in:
Akim Demaille
2012-02-18 19:19:26 +01:00
parent eff97eb54a
commit d0f2b7f856
10 changed files with 18 additions and 11 deletions

View File

@@ -528,9 +528,8 @@ yylex (void)
static int
power (int base, int exponent)
{
assert (0 <= exponent);
int res = 1;
if (exponent < 0)
exit (3);
for (/* Niente */; exponent; --exponent)
res *= base;
return res;