From 6c3601361ff22cb8bda3f483ea11c4f7bd095094 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 27 Sep 2012 13:30:15 +0200 Subject: 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 Signed-off-by: Paolo Bonzini --- migration-unix.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'migration-unix.c') 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; } -- cgit v1.1