From mboxrd@z Thu Jan 1 00:00:00 1970 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) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 27 Nov 2012 09:16:24 +0100 Message-Id: <1354004184-15543-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1.3] virtio-rng: do not use g_assert_cmpint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@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 --- 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); -- 1.8.0