From e6062fb6da2e6271222882b20093d5af63405e17 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 13 Jan 2012 12:19:08 +0100 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ lib/lbitset.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- 2.45.2