summaryrefslogtreecommitdiffstats
path: root/usr.bin/yacc
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2014-01-10 11:19:31 +0000
committersthen <sthen@openbsd.org>2014-01-10 11:19:31 +0000
commitb58644ae2f55ff897072a5475a88f543ae46fcda (patch)
tree11fd05d3850c33f8e89b980977b9d120f81de21d /usr.bin/yacc
parentremove md5 after installing it (with the links to the sha256/512 commands). (diff)
downloadwireguard-openbsd-b58644ae2f55ff897072a5475a88f543ae46fcda.tar.xz
wireguard-openbsd-b58644ae2f55ff897072a5475a88f543ae46fcda.zip
revert previous; height is never changed, but top is changed.
ok espie@ who saw intermittent sigbus in ports/math/hc with this.
Diffstat (limited to 'usr.bin/yacc')
-rw-r--r--usr.bin/yacc/lalr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c
index acd25cff4f0..f74539fec98 100644
--- a/usr.bin/yacc/lalr.c
+++ b/usr.bin/yacc/lalr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lalr.c,v 1.13 2014/01/09 23:07:50 millert Exp $ */
+/* $OpenBSD: lalr.c,v 1.14 2014/01/10 11:19:31 sthen Exp $ */
/* $NetBSD: lalr.c,v 1.4 1996/03/19 03:21:33 jtc Exp $ */
/*
@@ -629,10 +629,12 @@ traverse(int i)
unsigned *fp3;
int j;
short *rp;
+
+ int height;
unsigned *base;
VERTICES[++top] = i;
- INDEX[i] = top;
+ INDEX[i] = height = top;
base = F + i * tokensetsize;
fp3 = base + tokensetsize;
@@ -656,7 +658,7 @@ traverse(int i)
}
}
- if (INDEX[i] == top)
+ if (INDEX[i] == height)
{
for (;;)
{