qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH 1/1] virtio-rng: fix condition checking on period_ms


From: Wei Huang
Subject: [Qemu-devel] [PATCH 1/1] virtio-rng: fix condition checking on period_ms
Date: Fri, 19 Feb 2016 12:13:07 -0600

The condition checking on vrng->conf.period_ms appears to be wrong,
conflicting with the error comment following it.

Signed-off-by: Wei Huang <address@hidden>
---
 hw/virtio/virtio-rng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 473c044..a06427c 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -149,7 +149,7 @@ static void virtio_rng_device_realize(DeviceState *dev, 
Error **errp)
     VirtIORNG *vrng = VIRTIO_RNG(dev);
     Error *local_err = NULL;
 
-    if (!vrng->conf.period_ms > 0) {
+    if (!(vrng->conf.period_ms > 0)) {
         error_setg(errp, "'period' parameter expects a positive integer");
         return;
     }
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]