summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorChen Hanxiao <chenhanxiao@cn.fujitsu.com>2015-07-24 11:12:03 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2015-08-14 23:40:32 +0200
commit9284f31994919c001b54af57fc7d1bbb0d19b6fd (patch)
tree5b58ddff5ac997559c47217033255169afa6bc33 /exec.c
parentc097a60b100c10d79d8bd5c91ce804e865d7e70b (diff)
downloadqemu-9284f31994919c001b54af57fc7d1bbb0d19b6fd.zip
exec: use macro ROUND_UP for alignment
Use ROUND_UP instead. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> Message-Id: <1437707523-4910-1-git-send-email-chenhanxiao@cn.fujitsu.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 0a4a0c5af6..54cd70ac1e 100644
--- a/exec.c
+++ b/exec.c
@@ -1210,7 +1210,7 @@ static void *file_ram_alloc(RAMBlock *block,
unlink(filename);
g_free(filename);
- memory = (memory+hpagesize-1) & ~(hpagesize-1);
+ memory = ROUND_UP(memory, hpagesize);
/*
* ftruncate is not supported by hugetlbfs in older