X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6e30ede87a1c39c53842a6a747ecd9f7484d92a5..d03c0413f0c73f2ab6dde539928eaca8f9f86c9f:/lib/lbitset.c diff --git a/lib/lbitset.c b/lib/lbitset.c index d8cd9ed6..aa19f45d 100644 --- a/lib/lbitset.c +++ b/lib/lbitset.c @@ -1,7 +1,7 @@ /* Functions to support link list bitsets. - Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 Free Software - Foundation, Inc. + Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation, + Inc. Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz). @@ -352,7 +352,7 @@ lbitset_elt_find (bitset bset, bitset_windex windex, /* ELT is the nearest to the one we want. If it's not the one we want, the one we want does not exist. */ - if (elt && (windex - elt->index) < LBITSET_ELT_WORDS) + if (windex - elt->index < LBITSET_ELT_WORDS) { bset->b.cindex = elt->index; bset->b.csize = LBITSET_ELT_WORDS; @@ -936,17 +936,12 @@ lbitset_ones (bitset dst) static void lbitset_not (bitset dst, bitset src) { - lbitset_elt *elt; lbitset_elt *selt; lbitset_elt *delt; bitset_windex i; unsigned int j; bitset_windex windex; - /* This is another unfriendly operation for a linked list - bitset! */ - elt = LBITSET_TAIL (dst); - windex = (BITSET_SIZE_ (dst) + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS; for (i = 0; i < windex; i += LBITSET_ELT_WORDS)