From 2b61f7ce64b083c476b6c8eca04475aa17f94f70 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 20 Jun 2011 20:12:58 +0000 Subject: [PATCH] Use ALIGN_UP() macro for alignment, in a more correct way also. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30041 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/dircache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c index b6f3f8040c..27784ae369 100644 --- a/firmware/common/dircache.c +++ b/firmware/common/dircache.c @@ -851,7 +851,7 @@ int dircache_build(int last_size) * and their corresponding d_name from the end * after generation the buffer will be compacted with DIRCACHE_RESERVE * free bytes inbetween */ - audiobuf = (char*)(((intptr_t)audiobuf & ~0x03) + 0x04); + audiobuf = ALIGN_UP(audiobuf, sizeof(struct dircache_entry*)); dircache_root = (struct dircache_entry*)audiobuf; d_names_start = d_names_end = audiobufend - 1; dircache_size = 0;