migration: remove unreachable code after reading data
The code calls qio_channel_read() in a loop when it reports QIO_CHANNEL_ERR_BLOCK. This code is reported when errno==EAGAIN. As such the later block of code will always hit the 'errno != EAGAIN' condition, making the final 'else' unreachable. Fixes: Coverity CID 1490203 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220627135318.156121-1-berrange@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
parent
8f6fe91512
commit
5f87072e95
@ -411,10 +411,8 @@ static ssize_t qemu_fill_buffer(QEMUFile *f)
|
||||
f->total_transferred += len;
|
||||
} else if (len == 0) {
|
||||
qemu_file_set_error_obj(f, -EIO, local_error);
|
||||
} else if (len != -EAGAIN) {
|
||||
qemu_file_set_error_obj(f, len, local_error);
|
||||
} else {
|
||||
error_free(local_error);
|
||||
qemu_file_set_error_obj(f, len, local_error);
|
||||
}
|
||||
|
||||
return len;
|
||||
|
Loading…
Reference in New Issue
Block a user