aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc MarĂ­ <marc.mari.barcelo@gmail.com>2014-08-12 13:41:49 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-15 18:03:14 +0100
commitf75ffc585717a26169d180a905aa1f4299aa57e7 (patch)
tree4431a8caa45805a8a7aa3fcfe80a03c3265057c1 /tests
parentae74f18782d83c249e8bb9566bf5a2ad501ab82c (diff)
libqos: Correct mask to align size to PAGE_SIZE in malloc-pc
Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Marc MarĂ­ <marc.mari.barcelo@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/libqos/malloc-pc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c
index 63af60ac17..be1d97f8bb 100644
--- a/tests/libqos/malloc-pc.c
+++ b/tests/libqos/malloc-pc.c
@@ -36,7 +36,7 @@ static uint64_t pc_alloc(QGuestAllocator *allocator, size_t size)
size += (PAGE_SIZE - 1);
- size &= PAGE_SIZE;
+ size &= -PAGE_SIZE;
g_assert_cmpint((s->start + size), <=, s->end);