aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-07-06 09:12:14 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-07-06 09:12:14 +0000
commit96ae1ed6c847af7b5d6c520c7653f7e1cf074383 (patch)
tree01dd81fa4efb6b175c679924fce4151404106d17 /searchlib
parent779662baedfe2ca5168a4ef00d36eb22508da146 (diff)
Do not let large number turn negative and then become 1.
Do not make 0 become 1.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingstore.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
index 7902d3f8d87..ba58edf5805 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
@@ -445,12 +445,8 @@ PostingStore<DataT>::internalFrozenSize(uint32_t typeId, const RefType & iRef) c
const BTreeType *tree = getTreeEntry(iRef2);
return tree->frozenSize(_allocator);
} else {
- const BitVector *bv = bve->_bv.get();
// Some inaccuracy is expected, data changes underfeet
- int32_t res = bv->countTrueBits();
- if (res < 1)
- res = 1;
- return res;
+ return bve->_bv->countTrueBits();
}
} else {
const BTreeType *tree = getTreeEntry(iRef);