memblock: Add pa_memblock_acquire_chunk().

Besides making the code a bit cleaner, this also gets rid of
a few "cast increases required alignment of target type"
warnings.
This commit is contained in:
Tanu Kaskinen 2012-08-17 18:09:34 +03:00 committed by Tanu Kaskinen
parent 33e5802df2
commit 3d6092bb0f
16 changed files with 52 additions and 40 deletions

View file

@ -83,7 +83,7 @@ pa_memchunk *pa_memchunk_will_need(const pa_memchunk *c) {
/* A version of pa_memblock_will_need() that works on memchunks
* instead of memblocks */
p = (uint8_t*) pa_memblock_acquire(c->memblock) + c->index;
p = pa_memblock_acquire_chunk(c);
pa_will_need(p, c->length);
pa_memblock_release(c->memblock);