]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/crimson/common/throttle.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / crimson / common / throttle.cc
index bd919518107a2e50d81e2354ea5b6f6a49d49cc2..8aeaa1fdd7d9fd75420c42d2fd506562a1a7d1f5 100644 (file)
@@ -4,7 +4,7 @@ namespace crimson::common {
 
 int64_t Throttle::take(int64_t c)
 {
-  if (!max) {
+  if (max == 0u) {
     return 0;
   }
   count += c;
@@ -13,7 +13,7 @@ int64_t Throttle::take(int64_t c)
 
 int64_t Throttle::put(int64_t c)
 {
-  if (!max) {
+  if (max == 0u) {
     return 0;
   }
   if (!c) {
@@ -26,7 +26,7 @@ int64_t Throttle::put(int64_t c)
 
 seastar::future<> Throttle::get(size_t c)
 {
-  if (!max) {
+  if (max == 0u) {
     return seastar::make_ready_future<>();
   }
   return on_free_slots.wait([this, c] {