]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: pools: remove unused arguments to pool_evict_from_cache()
authorWilly Tarreau <w@1wt.eu>
Mon, 19 Apr 2021 05:49:50 +0000 (07:49 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 Apr 2021 13:24:33 +0000 (15:24 +0200)
In commit fb117e6a8 ("MEDIUM: memory: don't let pool_put_to_cache() free
the objects itself") pool_evict_from_cache() was introduced with no
argument, yet the only call place passes it the pool, the pointer and
the index number!

Let's remove these as they even let the reader think that the function
does something specific to the current pool while it's not the case.

include/haproxy/pool.h

index e0e03fc328cca087b69ba5bb4dffb56eb011109b..b9865a2b542e7476358b8ab0fa23d6553aad9d90 100644 (file)
@@ -139,7 +139,7 @@ static inline void pool_put_to_cache(struct pool_head *pool, void *ptr, ssize_t
        pool_cache_bytes += ph->size;
 
        if (unlikely(pool_cache_bytes > CONFIG_HAP_POOL_CACHE_SIZE))
-               pool_evict_from_cache(pool, ptr, idx);
+               pool_evict_from_cache();
 }
 
 #else // CONFIG_HAP_LOCAL_POOLS