mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
				synced 2025-11-04 12:37:54 +00:00 
			
		
		
		
	changed assert with if statement (#116)
This commit is contained in:
		
				
					committed by
					
						
						Matias Fontanini
					
				
			
			
				
	
			
			
			
						parent
						
							f458514fb2
						
					
				
				
					commit
					d77e7466b8
				
			@@ -849,9 +849,10 @@ void BufferedProducer<BufferType>::on_delivery_report(const Message& message) {
 | 
			
		||||
    if (tracker) {
 | 
			
		||||
        tracker->should_retry_.set_value(should_retry);
 | 
			
		||||
    }
 | 
			
		||||
    // Decrement the expected acks
 | 
			
		||||
    // Decrement the expected acks and check to prevent underflow
 | 
			
		||||
    if (pending_acks_ > 0) {
 | 
			
		||||
        --pending_acks_;
 | 
			
		||||
    assert(pending_acks_ != (size_t)-1); // Prevent underflow
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
} // cppkafka
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user