diff options
author | Akim Demaille <demaille@gostai.com> | 2012-02-18 19:19:26 +0100 |
---|---|---|
committer | Akim Demaille <demaille@gostai.com> | 2012-02-18 19:32:18 +0100 |
commit | d0f2b7f8566c186f34392efeedbab08c2ae72129 (patch) | |
tree | a253b56163a4689dadbd019b74914f64b5780f90 /etc | |
parent | eff97eb54a1ff17da66f9d1c746eb009feeba889 (diff) | |
download | bison-d0f2b7f8566c186f34392efeedbab08c2ae72129.tar.gz |
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.
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bench.pl.in | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/etc/bench.pl.in b/etc/bench.pl.in index 7e604309..0bee4df1 100755 --- a/etc/bench.pl.in +++ b/etc/bench.pl.in @@ -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; |