diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2014-01-09 23:07:51 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2014-01-09 23:07:51 +0000 |
commit | 9480debea37ac22aede40ebf0f2ca9f6191ad797 (patch) | |
tree | f80e4dc29279a6e6ec8d803f506cff24589b7ad1 /usr.bin/yacc/lalr.c | |
parent | 989deaf07a7e429edf4ad45c6356bc14f6e4ec95 (diff) |
Remove useless variable "height" in function traverse(). It is
assigned the value of "top" but never changed so just use top instead.
From Michael W. Bombardieri
Diffstat (limited to 'usr.bin/yacc/lalr.c')
-rw-r--r-- | usr.bin/yacc/lalr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c index 036ded6a7f2..acd25cff4f0 100644 --- a/usr.bin/yacc/lalr.c +++ b/usr.bin/yacc/lalr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lalr.c,v 1.12 2014/01/08 21:40:25 millert Exp $ */ +/* $OpenBSD: lalr.c,v 1.13 2014/01/09 23:07:50 millert Exp $ */ /* $NetBSD: lalr.c,v 1.4 1996/03/19 03:21:33 jtc Exp $ */ /* @@ -629,12 +629,10 @@ traverse(int i) unsigned *fp3; int j; short *rp; - - int height; unsigned *base; VERTICES[++top] = i; - INDEX[i] = height = top; + INDEX[i] = top; base = F + i * tokensetsize; fp3 = base + tokensetsize; @@ -658,7 +656,7 @@ traverse(int i) } } - if (INDEX[i] == height) + if (INDEX[i] == top) { for (;;) { |