X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/1462fcee1ed295b24f47758b370068aa6304bb41..6487c0b3709dfc8d4a6b8b086939e32f6c1d2f04:/lib/lbitset.c diff --git a/lib/lbitset.c b/lib/lbitset.c index d48a4a83..aa19f45d 100644 --- a/lib/lbitset.c +++ b/lib/lbitset.c @@ -1,6 +1,8 @@ /* Functions to support link list bitsets. - Copyright (C) 2002-2004, 2006, 2009-2010 Free Software Foundation, + + Copyright (C) 2002-2004, 2006, 2009-2012 Free Software Foundation, Inc. + Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz). This program is free software: you can redistribute it and/or modify @@ -350,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; @@ -934,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)