aboutsummaryrefslogtreecommitdiff
path: root/migration/qemu-file.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-05-30 20:39:40 +0200
committerJuan Quintela <quintela@redhat.com>2023-07-26 10:55:56 +0200
commit8c5ee0bfb86eae89c5480dc616bb9d2234ac1fd6 (patch)
tree36c72db4e1554408eb0b7e89bdacc8d28eba5db7 /migration/qemu-file.c
parent9ccf83f486277a00be85646b305af6683ef3b8ed (diff)
qemu-file: Simplify qemu_file_shutdown()
Reviewed-by: Peter Xu <peterx@redhat.com> Message-ID: <20230530183941.7223-20-quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/qemu-file.c')
-rw-r--r--migration/qemu-file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 9a89e17924..4c577bdff8 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -65,8 +65,6 @@ struct QEMUFile {
*/
int qemu_file_shutdown(QEMUFile *f)
{
- int ret = 0;
-
/*
* We must set qemufile error before the real shutdown(), otherwise
* there can be a race window where we thought IO all went though
@@ -96,10 +94,10 @@ int qemu_file_shutdown(QEMUFile *f)
}
if (qio_channel_shutdown(f->ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL) < 0) {
- ret = -EIO;
+ return -EIO;
}
- return ret;
+ return 0;
}
bool qemu_file_mode_is_not_valid(const char *mode)