From patchwork Tue Nov 27 08:16:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 202113 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7DBD92C008C for ; Tue, 27 Nov 2012 19:16:55 +1100 (EST) Received: from localhost ([::1]:34286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdGLc-0002L9-9k for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2012 03:16:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdGLM-0002K1-OJ for qemu-devel@nongnu.org; Tue, 27 Nov 2012 03:16:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdGLH-0001HK-BE for qemu-devel@nongnu.org; Tue, 27 Nov 2012 03:16:36 -0500 Received: from mail-wg0-f41.google.com ([74.125.82.41]:41547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdGLG-0001G5-S1 for qemu-devel@nongnu.org; Tue, 27 Nov 2012 03:16:31 -0500 Received: by mail-wg0-f41.google.com with SMTP id ds1so2236808wgb.4 for ; Tue, 27 Nov 2012 00:16:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer; bh=qTgYB6WYAN8PnZWC6SsInARtXpzdihnwPxN/NF2Rh3I=; b=Q5qXt/nfZlM8DDo1vm+2bgq7F+ZH/6MmN6cMYcpM2p3+I7PRDK/Bp9jIMyi3w/C8f0 sdwvRENgoORDLn12POkwfZeECrNsdpgGXBKJndABF/VKRKIL8GJp/rkv8cahc7cFPBk1 XB1QYq2c0zDyLTMD/yAJ6QdBlwNFV7QRhQqApwHBbyH49Z2g6ffQVot0d7rBCioXUtfS mW1B7W/1BLlbguzznKmlItGMuCarMwkcrBsIflcmulvpdpYpWz2on6khnZ5V3TR+283w AaPY8uJrZ+ygLntO04DSiaY2a9Qxfl2HNB/H9vRwfVtxJo8pIpQQ0FDrsZ+PFE9juNGe /FDQ== Received: by 10.216.206.143 with SMTP id l15mr4924907weo.153.1354004190126; Tue, 27 Nov 2012 00:16:30 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id dw4sm1718293wib.1.2012.11.27.00.16.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 27 Nov 2012 00:16:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2012 09:16:24 +0100 Message-Id: <1354004184-15543-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 74.125.82.41 Subject: [Qemu-devel] [PATCH 1.3] virtio-rng: do not use g_assert_cmpint X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org g_assert_cmpint is not available on glib 2.12, which is the minimum version required to build QEMU (we only require 2.16 to run tests, since that is the first version including GTester). Do not use it in hardware models, use a normal assertion instead. This fixes the buildbot failure for default_x86_64_rhel5. Signed-off-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi --- hw/virtio-rng.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c index f4ed9cf..df329f2 100644 --- a/hw/virtio-rng.c +++ b/hw/virtio-rng.c @@ -173,10 +173,9 @@ VirtIODevice *virtio_rng_init(DeviceState *dev, VirtIORNGConf *conf) vrng->qdev = dev; vrng->conf = conf; + assert(vrng->conf->max_bytes <= INT64_MAX); vrng->quota_remaining = vrng->conf->max_bytes; - g_assert_cmpint(vrng->conf->max_bytes, <=, INT64_MAX); - vrng->rate_limit_timer = qemu_new_timer_ms(vm_clock, check_rate_limit, vrng);