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-19 10:21:06 +0100
commitdd5611579b3978eff5c4aa22dc8459b8f53c2fc0 (patch)
tree645e4092f75fe8cd073cb90858217292f756b657 /etc
parent24bb5f8fb7f14df4050cbefd27ae60fa9cef259d (diff)
downloadbison-dd5611579b3978eff5c4aa22dc8459b8f53c2fc0.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. Conflicts: doc/bison.texinfo src/parse-gram.y
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 829a760c..ff3ce230 100755
--- a/etc/bench.pl.in
+++ b/etc/bench.pl.in
@@ -291,9 +291,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;