]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/container/test/expand_bwd_test_allocator.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / container / test / expand_bwd_test_allocator.hpp
index 60b32839e651d36d6d20a8579b33a92fbdfe5e7a..4d50fbb94fa436d18c44ba4c7346abaae9fa1cb0 100644 (file)
@@ -142,17 +142,14 @@ class expand_bwd_test_allocator
          reuse = 0;
          return (mp_buffer + m_offset);
       }
-      else if(m_allocations == 1){
-         if(limit_size > m_size){
-            assert(0);
+      else{
+         if(m_allocations != 1){
+            throw_bad_alloc();
          }
+         assert(limit_size <= m_size);
          ++m_allocations;
          return mp_buffer;
       }
-      else{
-         throw_bad_alloc();
-         return mp_buffer;
-      }
    }
 
    //!Returns maximum the number of objects the previously allocated memory