diff options
author | tron <tron@openttd.org> | 2005-09-08 12:48:26 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-09-08 12:48:26 +0000 |
commit | 45ca3b6336f1c6e7c2991319837132b607d482dc (patch) | |
tree | 3f41cacc0471e60af369fc95349585751ff00335 /settings.c | |
parent | d73d12ae8a75dc15a233bb2b0749165aca263e23 (diff) | |
download | openttd-45ca3b6336f1c6e7c2991319837132b607d482dc.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.c | 2 |
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) { |