aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-13 17:51:21 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-13 17:51:21 +0000
commit9258a108b21648156e44b771493355db0361008a (patch)
tree39e23dd24232ce03735ae2cfe73f63c544556f0c /code
parent78c1637d646b663b3a0ea22500ad094564e7e28b (diff)
downloadioquake3-aero-9258a108b21648156e44b771493355db0361008a.tar.gz
ioquake3-aero-9258a108b21648156e44b771493355db0361008a.zip
use common macro for alignment
git-svn-id: svn://svn.icculus.org/quake3/trunk@339 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/qcommon/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/code/qcommon/common.c b/code/qcommon/common.c
index 3b582fc..5676daa 100644
--- a/code/qcommon/common.c
+++ b/code/qcommon/common.c
@@ -928,7 +928,7 @@ void *Z_TagMalloc( int size, int tag ) {
//
size += sizeof(memblock_t); // account for size of block header
size += 4; // space for memory trash tester
- size = (size + sizeof(void*)-1)&~(sizeof(void*)-1); // align to 32/64 bit boundary
+ size = ALIGN(size); // align to 32/64 bit boundary
base = rover = zone->rover;
start = base->prev;
@@ -1745,7 +1745,7 @@ void *Hunk_AllocateTempMemory( int size ) {
Hunk_SwapBanks();
- size = ( (size+sizeof(void*)-1)&~(sizeof(void*)-1) ) + sizeof( hunkHeader_t );
+ size = ALIGN(size) + sizeof( hunkHeader_t );
if ( hunk_temp->temp + hunk_permanent->permanent + size > s_hunkTotal ) {
Com_Error( ERR_DROP, "Hunk_AllocateTempMemory: failed on %i", size );