summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/virtio-rng.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/virtio-rng.c b/hw/virtio-rng.c
index f4ed9cf92a..df329f25e1 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);