mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
committed by
Anthony Liguori
parent
306eb457fd
commit
e30f328c74
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user