]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: pools: fix build error on DEBUG_POOL_TRACING
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Jan 2022 14:56:50 +0000 (15:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Jan 2022 14:59:18 +0000 (15:59 +0100)
When squashing commit add43fa43 ("DEBUG: pools: add new build option
DEBUG_POOL_TRACING") I managed to break the build and to fail to detect
it even after the rebase and a full rebuild :-(

src/pool.c

index a20880b944cd0c5e3a654c6dd0c689e6877a6fe1..3fda2fbd8caeb0bfc304973ee729e86b9a836d98 100644 (file)
@@ -284,7 +284,7 @@ void *pool_alloc_nocache(struct pool_head *pool)
 
        /* keep track of where the element was allocated from */
        POOL_DEBUG_SET_MARK(pool, ptr);
-       POOL_DEBUG_TRACE_CALLER(pool, item, NULL);
+       POOL_DEBUG_TRACE_CALLER(pool, (struct pool_cache_item *)ptr, NULL);
        return ptr;
 }
 
@@ -470,9 +470,9 @@ void pool_refill_local_from_shared(struct pool_head *pool, struct pool_cache_hea
                down = ret->down;
                /* keep track of where the element was allocated from */
                POOL_DEBUG_SET_MARK(pool, ret);
-               POOL_DEBUG_TRACE_CALLER(pool, item, NULL);
 
                item = (struct pool_cache_item *)ret;
+               POOL_DEBUG_TRACE_CALLER(pool, item, NULL);
                LIST_INSERT(&pch->list, &item->by_pool);
                LIST_INSERT(&th_ctx->pool_lru_head, &item->by_lru);
                count++;