1
0
Fork 0
forked from len0rd/rockbox

remove align_buffer from firmare/general.c, replacing with ALIGN_BUFFER macro, and replace all uses of it (only resize.c in core, and pictureflow and mpegplayer plugins), remove it from plugin_api,

and remove wrapper for it from plugin.h


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19758 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andrew Mahone 2009-01-13 13:48:26 +00:00
parent c0d9084d6a
commit 2fbf09752d
12 changed files with 23 additions and 59 deletions

View file

@ -78,23 +78,3 @@ int make_list_from_caps32(unsigned long src_mask,
return count;
} /* make_list_from_caps32 */
/* Align a buffer and size to a size boundary while remaining within
* the original boundaries */
size_t align_buffer(void **start, size_t size, size_t align)
{
void *newstart = *start;
void *newend = newstart + size;
/* Align the end down and the start up */
newend = (void *)ALIGN_DOWN((intptr_t)newend, align);
newstart = (void *)ALIGN_UP((intptr_t)newstart, align);
/* Hmmm - too small for this */
if (newend <= newstart)
return 0;
/* Return adjusted pointer and size */
*start = newstart;
return newend - newstart;
}