aboutsummaryrefslogtreecommitdiff
path: root/migration-unix.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-09-27 13:30:15 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-11-02 18:35:07 +0100
commit6c3601361ff22cb8bda3f483ea11c4f7bd095094 (patch)
tree4294f16cf1572fa5118ca15f4dcfb618e39f4279 /migration-unix.c
parent09bac73c13b57acd304efb54a361c244d60d375c (diff)
downloadqemu-6c3601361ff22cb8bda3f483ea11c4f7bd095094.zip
qemu-6c3601361ff22cb8bda3f483ea11c4f7bd095094.tar.gz
qemu-6c3601361ff22cb8bda3f483ea11c4f7bd095094.tar.bz2
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>
Diffstat (limited to 'migration-unix.c')
-rw-r--r--migration-unix.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/migration-unix.c b/migration-unix.c
index 5dc49cd..9b5521e 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -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;
}