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.
This commit is contained in:
Jim Meyering
2012-01-13 12:19:08 +01:00
parent 3bce8ffc3d
commit e6062fb6da
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2012-01-13 Jim Meyering <meyering@redhat.com>
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 <akim@lrde.epita.fr>
maint: factor copyright year.

View File

@@ -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;