]> git.proxmox.com Git - qemu.git/commit - util/iov.c
iov: reorganize iov_send_recv, part 2
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 27 Mar 2013 16:36:29 +0000 (17:36 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Apr 2013 09:43:44 +0000 (11:43 +0200)
commit5209d6753c90a3d6411abd0729a9cca3775dce3f
treec862a6d124ea97bb122a0717fac2f784d79fd193
parentcb6247a7e3e07ead908d2e7fbc8848cc2e135056
iov: reorganize iov_send_recv, part 2

Do not touch the "bytes" argument anymore.  Instead, remember the
original length of the last iovec if we touch it, and restore it
afterwards.

This requires undoing the changes in opposite order.  The previous
algorithm didn't care.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Orit Wassermann <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/iov.c