memblock: use built-in function

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
This commit is contained in:
Lu Guanqun 2011-08-15 13:24:51 +08:00 committed by Colin Guthrie
parent ecbb4b4ef4
commit 5fe545de23

View file

@ -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);