aboutsummaryrefslogtreecommitdiff
path: root/migration/rdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration/rdma.c')
-rw-r--r--migration/rdma.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index d1e727f..ff8e475 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -2871,7 +2871,7 @@ static ssize_t qio_channel_rdma_readv(QIOChannel *ioc,
RDMAControlHeader head;
int ret = 0;
ssize_t i;
- size_t done = 0;
+ size_t done = 0, len;
RCU_READ_LOCK_GUARD();
rdma = qatomic_rcu_read(&rioc->rdmain);
@@ -2892,9 +2892,9 @@ static ssize_t qio_channel_rdma_readv(QIOChannel *ioc,
* were given and dish out the bytes until we run
* out of bytes.
*/
- ret = qemu_rdma_fill(rdma, data, want, 0);
- done += ret;
- want -= ret;
+ len = qemu_rdma_fill(rdma, data, want, 0);
+ done += len;
+ want -= len;
/* Got what we needed, so go to next iovec */
if (want == 0) {
continue;
@@ -2921,9 +2921,9 @@ static ssize_t qio_channel_rdma_readv(QIOChannel *ioc,
/*
* SEND was received with new bytes, now try again.
*/
- ret = qemu_rdma_fill(rdma, data, want, 0);
- done += ret;
- want -= ret;
+ len = qemu_rdma_fill(rdma, data, want, 0);
+ done += len;
+ want -= len;
/* Still didn't get enough, so lets just return */
if (want) {