summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAkim Demaille <demaille@gostai.com>2012-02-18 19:19:26 +0100
committerAkim Demaille <demaille@gostai.com>2012-02-18 19:32:18 +0100
commitd0f2b7f8566c186f34392efeedbab08c2ae72129 (patch)
treea253b56163a4689dadbd019b74914f64b5780f90 /etc
parenteff97eb54a1ff17da66f9d1c746eb009feeba889 (diff)
downloadbison-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-xetc/bench.pl.in3
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;