CLEANUP: pools: get rid of CONFIG_HAP_POOLS
This one was set in defaults.h only when neither DEBUG_NO_POOLS nor
DEBUG_UAF were set. This was not the most convenient location to look
for it, and it was only used in pool.c to decide on the initial value
of POOL_DBG_NO_CACHE.
Let's just use DEBUG_NO_POOLS || DEBUG_UAF directly on this flag and
get rid of the intermediary condition. This also has the benefit of
removing a double inversion, which is always nice for understanding.
diff --git a/include/haproxy/defaults.h b/include/haproxy/defaults.h
index 7b49928..b1cfc7c 100644
--- a/include/haproxy/defaults.h
+++ b/include/haproxy/defaults.h
@@ -410,13 +410,6 @@
#define DEFAULT_MAXZLIBMEM 0
#endif
-/* Pools are always enabled unless explicitly disabled. When disabled, the
- * calls are directly passed to the underlying OS functions.
- */
-#if !defined(DEBUG_NO_POOLS) && !defined(DEBUG_UAF)
-#define CONFIG_HAP_POOLS
-#endif
-
/* On modern architectures with many threads, a fast memory allocator, and
* local pools, the global pools with their single list can be way slower than
* the standard allocator which already has its own per-thread arenas. In this
diff --git a/src/pool.c b/src/pool.c
index 8b33247..fd40cd8 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -52,7 +52,7 @@
#ifdef CONFIG_HAP_NO_GLOBAL_POOLS
POOL_DBG_NO_GLOBAL |
#endif
-#ifndef CONFIG_HAP_POOLS
+#if defined(DEBUG_NO_POOLS) || defined(DEBUG_UAF)
POOL_DBG_NO_CACHE |
#endif
#if defined(DEBUG_POOL_TRACING)