[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-upstream-unstable] virtio-rng: do not use g_assert_cmpint



commit 03a36f17d7788e4a1e07b3341b18028aa0206845
Author: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date:   Tue Nov 27 09:16:24 2012 +0100

    virtio-rng: do not use g_assert_cmpint
    
    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 <pbonzini@xxxxxxxxxx>
    Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
---
 hw/virtio-rng.c |    3 +--
 1 files changed, 1 insertions(+), 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);
 
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.