diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c index f4ed9cf92a9dcf0f0e6ec2ca7d8c92af60ca1fdc..df329f25e1edd5237f99d9a82df84ad7af29ac12 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);