diff options
author | Juan Quintela <quintela@redhat.com> | 2021-11-22 13:01:29 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2022-01-28 15:38:23 +0100 |
commit | c27779a215843e92eb120de80f982f3a63d1becb (patch) | |
tree | e0c6a1715d3970d6d5793c16778a76c4afb20c38 /migration | |
parent | d48c3a044537689866fe44e65d24c7d39a68868a (diff) |
multifd: Unfold "used" variable by its value
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/multifd.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/migration/multifd.c b/migration/multifd.c index 1d4885e1a0..e5b1fa5015 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -1062,7 +1062,6 @@ static void *multifd_recv_thread(void *opaque) rcu_register_thread(); while (true) { - uint32_t used; uint32_t flags; if (p->quit) { @@ -1085,17 +1084,16 @@ static void *multifd_recv_thread(void *opaque) break; } - used = p->pages->num; flags = p->flags; /* recv methods don't know how to handle the SYNC flag */ p->flags &= ~MULTIFD_FLAG_SYNC; - trace_multifd_recv(p->id, p->packet_num, used, flags, + trace_multifd_recv(p->id, p->packet_num, p->pages->num, flags, p->next_packet_size); p->num_packets++; - p->num_pages += used; + p->num_pages += p->pages->num; qemu_mutex_unlock(&p->mutex); - if (used) { + if (p->pages->num) { ret = multifd_recv_state->ops->recv_pages(p, &local_err); if (ret != 0) { break; |