From f75ffc585717a26169d180a905aa1f4299aa57e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Mar=C3=AD?= Date: Tue, 12 Aug 2014 13:41:49 +0200 Subject: libqos: Correct mask to align size to PAGE_SIZE in malloc-pc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Signed-off-by: Marc MarĂ­ Signed-off-by: Stefan Hajnoczi --- tests/libqos/malloc-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1