summaryrefslogtreecommitdiff
path: root/settings.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-09-08 12:48:26 +0000
committertron <tron@openttd.org>2005-09-08 12:48:26 +0000
commitc20b5883bd7e917dee83367eeea9e795d16bfc63 (patch)
tree3f41cacc0471e60af369fc95349585751ff00335 /settings.c
parent0f08a1c69421f2d0ec718d8b53404c53fb65606a (diff)
downloadopenttd-c20b5883bd7e917dee83367eeea9e795d16bfc63.tar.xz
(svn r2924) Introduce the ALIGN() macro which aligns values to multiples of a power of 2, for exact semantics see the commment in macros.h
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/settings.c b/settings.c
index 65eef0544..9e3580299 100644
--- a/settings.c
+++ b/settings.c
@@ -50,7 +50,7 @@ static void *pool_alloc(SettingsMemoryPool **pool, uint size)
uint pos;
SettingsMemoryPool *p = *pool;
- size = (size + 3) & ~3; // align everything to a 32 bit boundary
+ size = ALIGN(size, 4); // align everything to a 32 bit boundary
// first check if there's memory in the next pool
if (p->next && p->next->pos + size <= p->next->size) {