aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-serial-bus.c
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-04-27 18:04:01 +0530
committerAnthony Liguori <aliguori@us.ibm.com>2010-04-28 08:58:21 -0500
commite30f328c7429d4e891ce6da26af95c607f392739 (patch)
tree9244cc28eaea6aca37cb015544c22e6a4a6ecd28 /hw/virtio-serial-bus.c
parent306eb457fd057b7d0185145530a98f236b1c9aa4 (diff)
virtio-serial: Remove redundant check for 0-sized write request
The check for a 0-sized write request to a guest port is not necessary; the while loop below won't be executed in this case and all will be fine. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-serial-bus.c')
-rw-r--r--hw/virtio-serial-bus.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 8efba0bf85..c1d9851788 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -91,9 +91,6 @@ static size_t write_to_port(VirtIOSerialPort *port,
if (!virtio_queue_ready(vq)) {
return 0;
}
- if (!size) {
- return 0;
- }
while (offset < size) {
int i;