diff options
author | Li Zhang <lizhang@suse.de> | 2022-01-27 21:02:01 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-02-11 16:51:09 +0100 |
commit | bca762c2b90979e8cf1f725cec3ddf888b7b898b (patch) | |
tree | 619616fd3fa83b06c0e6b42cfdfd13ae6d18d038 /migration/multifd.c | |
parent | e3f37b2ce613c5597cc394800874c8716ea8936a (diff) |
multifd: Remove some redundant code
Clean up some unnecessary code
Signed-off-by: Li Zhang <lizhang@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/multifd.c')
-rw-r--r-- | migration/multifd.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/migration/multifd.c b/migration/multifd.c index c8132ab7e8..7aa030fb19 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -892,19 +892,15 @@ static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque) Error *local_err = NULL; trace_multifd_new_send_channel_async(p->id); - if (qio_task_propagate_error(task, &local_err)) { - goto cleanup; - } else { + if (!qio_task_propagate_error(task, &local_err)) { p->c = QIO_CHANNEL(sioc); qio_channel_set_delay(p->c, false); p->running = true; - if (!multifd_channel_connect(p, sioc, local_err)) { - goto cleanup; + if (multifd_channel_connect(p, sioc, local_err)) { + return; } - return; } -cleanup: multifd_new_send_channel_cleanup(p, sioc, local_err); } @@ -1115,10 +1111,7 @@ static void *multifd_recv_thread(void *opaque) ret = qio_channel_read_all_eof(p->c, (void *)p->packet, p->packet_len, &local_err); - if (ret == 0) { /* EOF */ - break; - } - if (ret == -1) { /* Error */ + if (ret == 0 || ret == -1) { /* 0: EOF -1: Error */ break; } |