1
0
mirror of https://github.com/ceph/ceph synced 2025-03-22 10:17:23 +00:00

Merge pull request from aainscow/flat_maps_fix

common:  Remove unnecessary assert checking unsigned number is 0 or greater in bitset_set.h
This commit is contained in:
Alex Ainscow 2025-03-12 00:18:10 +00:00 committed by GitHub
commit be3c7b5fb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,7 +220,7 @@ class bitset_set {
// This is not an off-by-one error. Conventionally this would have length
// - 1, but the logic below is simpler with it as follows.
unsigned end_word = (int(start) + length) / bits_per_uint64_t;
ceph_assert(0 <= end_word && end_word < word_count + 1);
ceph_assert(end_word < word_count + 1);
if (start_word == end_word) {
words[start_word] &=