From: millert Date: Thu, 9 Jan 2014 23:07:50 +0000 (+0000) Subject: Remove useless variable "height" in function traverse(). It is X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5ec43f377baec23910ddca3503b3d9727a415a00;p=openbsd 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 --- 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 (;;) {