Skip to content

Commit 1aff746

Browse files
committed
erasure-code/consistency: Fixed signed-compare warning in ConsistencyChecker
Signed-off-by: Jon Bailey <[email protected]>
1 parent f80ba9d commit 1aff746

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/erasure-code/consistency/ConsistencyChecker.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ bool ConsistencyChecker::check_object_consistency(const std::string& oid,
122122
ceph_assert(outbl->length() >= data_and_parity.second.length());
123123
// We check the difference is not larger than the page size multipled by the
124124
// number of parities
125-
ceph_assert(outbl->length() - data_and_parity.second.length()
126-
<= (encoder.get_m() * encoder.get_chunk_size()) - encoder.get_m());
125+
ceph_assert(std::cmp_less_equal(outbl->length() - data_and_parity.second.length(),
126+
(encoder.get_m() * encoder.get_chunk_size()) - encoder.get_m()));
127127
// We truncate the encoded parity to the size of the client read for comparison
128128
if (outbl->length() != data_and_parity.second.length())
129129
{

0 commit comments

Comments
 (0)