From 2fbf09752d385af861279af195d68f920859202d Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Tue, 13 Jan 2009 13:48:26 +0000 Subject: 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 --- firmware/general.c | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'firmware/general.c') diff --git a/firmware/general.c b/firmware/general.c index 1c2abe1256..ff6594086e 100644 --- a/firmware/general.c +++ b/firmware/general.c @@ -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; -} -- cgit v1.2.3