From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XD9FJ-00020p-8i for qemu-devel@nongnu.org; Fri, 01 Aug 2014 05:35:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XD9F9-0003Oc-2L for qemu-devel@nongnu.org; Fri, 01 Aug 2014 05:35:29 -0400 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:58413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XD9F8-0003OG-Rf for qemu-devel@nongnu.org; Fri, 01 Aug 2014 05:35:18 -0400 Received: by mail-wg0-f42.google.com with SMTP id l18so3956377wgh.1 for ; Fri, 01 Aug 2014 02:35:18 -0700 (PDT) From: =?UTF-8?q?Marc=20Mar=C3=AD?= Date: Fri, 1 Aug 2014 11:34:54 +0200 Message-Id: <1406885699-4765-5-git-send-email-marc.mari.barcelo@gmail.com> In-Reply-To: <1406885699-4765-1-git-send-email-marc.mari.barcelo@gmail.com> References: <1406885699-4765-1-git-send-email-marc.mari.barcelo@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v3 4/9] 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?= , Paolo Bonzini , Stefan Hajnoczi Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Signed-off-by: Marc MarĂ­ --- 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, size_t size) size += (PAGE_SIZE - 1); - size &= PAGE_SIZE; + size &= -PAGE_SIZE; g_assert_cmpint((s->start + size), <=, s->end); -- 1.7.10.4