Received: from eggs.gnu.org ([2001:4830:134:3::10]:50535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIKzb-0007gG-PG for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XIKzV-0000Uq-K7 for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XIKzV-0000Uj-9z for qemu-devel@nongnu.org; Fri, 15 Aug 2014 13:08:37 -0400 From: Stefan Hajnoczi Date: Fri, 15 Aug 2014 18:06:49 +0100 Message-Id: <1408122422-13935-43-git-send-email-stefanha@redhat.com> In-Reply-To: <1408122422-13935-1-git-send-email-stefanha@redhat.com> References: <1408122422-13935-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 42/55] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc=20Mar=C3=AD?= , Peter Maydell , Stefan Hajnoczi , Paolo Bonzini From: Marc Mar=C3=AD Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Signed-off-by: Marc Mar=C3=AD 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 63af60a..be1d97f 100644 --- a/tests/libqos/malloc-pc.c +++ b/tests/libqos/malloc-pc.c @@ -36,7 +36,7 @@ static uint64_t pc_alloc(QGuestAllocator *allocator, si= ze_t size) =20 =20 size +=3D (PAGE_SIZE - 1); - size &=3D PAGE_SIZE; + size &=3D -PAGE_SIZE; =20 g_assert_cmpint((s->start + size), <=3D, s->end); =20 --=20 1.9.3