From: Wei Huang <wei@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, mst@redhat.com
Subject: [Qemu-trivial] [PATCH 1/1] virtio-rng: fix condition checking on period_ms
Date: Fri, 19 Feb 2016 12:13:07 -0600 [thread overview]
Message-ID: <1455905587-4347-1-git-send-email-wei@redhat.com> (raw)
The condition checking on vrng->conf.period_ms appears to be wrong,
conflicting with the error comment following it.
Signed-off-by: Wei Huang <wei@redhat.com>
---
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
WARNING: multiple messages have this Message-ID (diff)
From: Wei Huang <wei@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, mst@redhat.com
Subject: [Qemu-devel] [PATCH 1/1] virtio-rng: fix condition checking on period_ms
Date: Fri, 19 Feb 2016 12:13:07 -0600 [thread overview]
Message-ID: <1455905587-4347-1-git-send-email-wei@redhat.com> (raw)
The condition checking on vrng->conf.period_ms appears to be wrong,
conflicting with the error comment following it.
Signed-off-by: Wei Huang <wei@redhat.com>
---
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
next reply other threads:[~2016-02-19 18:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-19 18:13 Wei Huang [this message]
2016-02-19 18:13 ` [Qemu-devel] [PATCH 1/1] virtio-rng: fix condition checking on period_ms Wei Huang
2016-02-19 20:57 ` [Qemu-trivial] " Laszlo Ersek
2016-02-19 20:57 ` Laszlo Ersek
2016-02-19 20:59 ` [Qemu-trivial] " Laszlo Ersek
2016-02-19 20:59 ` Laszlo Ersek
2016-02-19 21:07 ` [Qemu-trivial] " Wei Huang
2016-02-19 21:07 ` Wei Huang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455905587-4347-1-git-send-email-wei@redhat.com \
--to=wei@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.