]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
erasure-code/consistency: Fixed signed-compare warning in ConsistencyChecker 65174/head
authorJon <jonathan.bailey1@ibm.com>
Thu, 21 Aug 2025 15:43:06 +0000 (16:43 +0100)
committerJon <jonathan.bailey1@ibm.com>
Thu, 21 Aug 2025 15:43:06 +0000 (16:43 +0100)
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
src/erasure-code/consistency/ConsistencyChecker.cc

index af41e8e3df45486e33b236440f3856683b7ce295..3fe655b213f101830d63bf76831f6f3c0d986b7d 100644 (file)
@@ -122,8 +122,8 @@ bool ConsistencyChecker::check_object_consistency(const std::string& oid,
   ceph_assert(outbl->length() >= data_and_parity.second.length());
   // We check the difference is not larger than the page size multipled by the
   //    number of parities
-  ceph_assert(outbl->length() - data_and_parity.second.length()
-                <= (encoder.get_m() * encoder.get_chunk_size()) - encoder.get_m());
+  ceph_assert(std::cmp_less_equal(outbl->length() - data_and_parity.second.length(),
+                (encoder.get_m() * encoder.get_chunk_size()) - encoder.get_m()));
   // We truncate the encoded parity to the size of the client read for comparison
   if (outbl->length() != data_and_parity.second.length())
   {