From: Amit Shah Date: Tue, 27 Apr 2010 12:34:01 +0000 (+0530) Subject: virtio-serial: Remove redundant check for 0-sized write request X-Git-Tag: v0.13.0-rc0~656 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e30f328c7429d4e891ce6da26af95c607f392739;p=thirdparty%2Fqemu.git 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 Signed-off-by: Anthony Liguori --- diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index 8efba0bf850..c1d98517880 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;