mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
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:
parent
33e5802df2
commit
3d6092bb0f
16 changed files with 52 additions and 40 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue