From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCcMe-0000Ji-5q for qemu-devel@nongnu.org; Wed, 30 Jul 2014 18:28:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCcMY-0003Tv-1a for qemu-devel@nongnu.org; Wed, 30 Jul 2014 18:28:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCcMX-0003Tm-Q7 for qemu-devel@nongnu.org; Wed, 30 Jul 2014 18:28:45 -0400 From: John Snow Date: Wed, 30 Jul 2014 18:28:26 -0400 Message-Id: <1406759309-13742-2-git-send-email-jsnow@redhat.com> In-Reply-To: <1406759309-13742-1-git-send-email-jsnow@redhat.com> References: <1406759309-13742-1-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 1/4] 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: marc.mari.barcelo@gmail.com, pbonzini@redhat.com, jsnow@redhat.com, stefanha@redhat.com From: Marc Mar=C3=AD Signed-off-by: Paolo Bonzini Signed-off-by: Marc Mar=C3=AD Signed-off-by: John Snow --- 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 db1496c..2efd095 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