From: Jim Meyering Date: Fri, 13 Jan 2012 11:19:08 +0000 (+0100) Subject: build: avoid warning from coverity about lbitset_elt_find X-Git-Tag: v2.5.1_rc2~138 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/e6062fb6da2e6271222882b20093d5af63405e17 build: avoid warning from coverity about lbitset_elt_find * lib/lbitset.c (lbitset_elt_find): Remove unnecessary test of "elt", at a point where we know it is non-NULL, due to prior dereference. --- diff --git a/ChangeLog b/ChangeLog index 59b80408..cefbc832 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-01-13 Jim Meyering + + build: avoid warning from coverity about lbitset_elt_find + * lib/lbitset.c (lbitset_elt_find): Remove unnecessary test of "elt", + at a point where we know it is non-NULL, due to prior dereference. + 2012-01-13 Akim Demaille maint: factor copyright year. diff --git a/lib/lbitset.c b/lib/lbitset.c index 7d204f0e..aa19f45d 100644 --- a/lib/lbitset.c +++ b/lib/lbitset.c @@ -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;