projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
306eb45
)
virtio-serial: Remove redundant check for 0-sized write request
author
Amit Shah
<amit.shah@redhat.com>
Tue, 27 Apr 2010 12:34:01 +0000
(18:04 +0530)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Wed, 28 Apr 2010 13:58:21 +0000
(08:58 -0500)
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>
hw/virtio-serial-bus.c
patch
|
blob
|
history
diff --git
a/hw/virtio-serial-bus.c
b/hw/virtio-serial-bus.c
index 8efba0bf8505449890d09140b433417491a16a90..c1d9851788031d8418034bf7e4ab72f823b55794 100644
(file)
--- 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;