diff options
author | Jim Meyering <meyering@redhat.com> | 2012-01-13 12:19:08 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-01-13 12:19:08 +0100 |
commit | e6062fb6da2e6271222882b20093d5af63405e17 (patch) | |
tree | 576e09b4280f59c48e257c785a78d31c5b50a02e | |
parent | 3bce8ffc3d90506205d5b0eba25f9057d2ffd5d5 (diff) | |
download | bison-e6062fb6da2e6271222882b20093d5af63405e17.tar.gz |
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.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/lbitset.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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. 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; |