Message ID | 1366106194-28826-10-git-send-email-kraxel@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/spice-qemu-char.c b/spice-qemu-char.c index ff95fcb..f10970c 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -35,7 +35,8 @@ static int vmc_write(SpiceCharDeviceInstance *sin, const uint8_t *buf, int len) uint8_t* p = (uint8_t*)buf; while (len > 0) { - last_out = MIN(len, qemu_chr_be_can_write(scd->chr)); + int can_write = qemu_chr_be_can_write(scd->chr); + last_out = MIN(len, can_write); if (last_out <= 0) { break; }