mirror of
https://github.com/mii443/qemu.git
synced 2025-12-07 21:18:22 +00:00
migration: xxx_close will only be called once
No need to test s->fd again, it is tested in the caller. Reviewed-by: Orit Wasserman <owasserm@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -44,11 +44,8 @@ static int unix_close(MigrationState *s)
|
||||
{
|
||||
int r = 0;
|
||||
DPRINTF("unix_close\n");
|
||||
if (s->fd != -1) {
|
||||
if (close(s->fd) < 0) {
|
||||
r = -errno;
|
||||
}
|
||||
s->fd = -1;
|
||||
if (close(s->fd) < 0) {
|
||||
r = -errno;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user