From: Eduardo Habkost Date: Thu, 10 Nov 2011 12:41:42 +0000 (-0200) Subject: migrate_fd_cleanup: accept any negative qemu_fclose() value as error X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a6d34a949c3546404d403bda61a5e37431b4a6ad;p=qmiga%2Fqemu.git migrate_fd_cleanup: accept any negative qemu_fclose() value as error Also, we now return the qemu_fclose() value unchanged to the caller. For reference, the migrate_fd_cleanup() callers are the following: - migrate_fd_completed(): any negative value is considered an error, so the change is OK. - migrate_fd_error(): doesn't check the migrate_fd_cleanup() return value - migrate_fd_cancel(): doesn't check the migrate_fd_cleanup() return value Signed-off-by: Eduardo Habkost Signed-off-by: Anthony Liguori --- diff --git a/migration.c b/migration.c index 75d4f02373..412fdfe5bf 100644 --- a/migration.c +++ b/migration.c @@ -174,9 +174,7 @@ static int migrate_fd_cleanup(MigrationState *s) if (s->file) { DPRINTF("closing file\n"); - if (qemu_fclose(s->file) != 0) { - ret = -1; - } + ret = qemu_fclose(s->file); s->file = NULL; } else { if (s->mon) {