]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: Remove unnecessary assert checking unsigned number is 0 or greater. 62217/head
authorAlex Ainscow <aainscow@uk.ibm.com>
Tue, 11 Mar 2025 09:56:07 +0000 (09:56 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Tue, 11 Mar 2025 17:09:33 +0000 (17:09 +0000)
Minor compiler warning caused by unsigned comparison with zero. Clearly
assert is not necessary and so was removed. Wrapping scenarios are
policed using remaining assert code.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
src/common/bitset_set.h

index 0b19b0041e01db1b2d425ed055073d1f90de4de5..ac1dec5c1834cd6d82b17092d8d1af7d5c62bf27 100644 (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] &=