From 5fe545de233f2a8b8f534a63d3fb6c5b903c977b Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Mon, 15 Aug 2011 13:24:51 +0800 Subject: memblock: use built-in function Signed-off-by: Lu Guanqun --- src/pulsecore/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c index 19be15176..97397317b 100644 --- a/src/pulsecore/memblock.c +++ b/src/pulsecore/memblock.c @@ -229,7 +229,7 @@ static pa_memblock *memblock_new_appended(pa_mempool *p, size_t length) { /* If -1 is passed as length we choose the size for the caller. */ if (length == (size_t) -1) - length = p->block_size - PA_ALIGN(sizeof(pa_memblock)); + length = pa_mempool_block_size_max(p); b = pa_xmalloc(PA_ALIGN(sizeof(pa_memblock)) + length); PA_REFCNT_INIT(b); -- cgit v1.2.3