From 3dc86242653245e3ce3eed348cd7de2c6951a3cc Mon Sep 17 00:00:00 2001 From: Andrei Alexeyev <0x416b617269@gmail.com> Date: Sat, 15 Jun 2024 09:30:01 +0200 Subject: [PATCH] memory/mempool: fix warning --- src/memory/mempool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memory/mempool.c b/src/memory/mempool.c index 1e2eb904..07a222ad 100644 --- a/src/memory/mempool.c +++ b/src/memory/mempool.c @@ -32,6 +32,6 @@ void mempool_generic_release(MemPool *pool, void *object) { pool->free_objects.as_generic = obj; --pool->num_used; - assert(pool->num_used >= 0); + assert(pool->num_used + 1 > pool->num_used); assert(pool->num_used <= pool->num_allocated); }