From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLJuI-0002mE-IS for qemu-devel@nongnu.org; Tue, 01 Nov 2011 15:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLJuH-00087B-KW for qemu-devel@nongnu.org; Tue, 01 Nov 2011 15:21:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLJuH-00086q-Cp for qemu-devel@nongnu.org; Tue, 01 Nov 2011 15:21:57 -0400 From: Eduardo Habkost Date: Tue, 1 Nov 2011 17:20:23 -0200 Message-Id: <1320175230-27980-5-git-send-email-ehabkost@redhat.com> In-Reply-To: <1320175230-27980-1-git-send-email-ehabkost@redhat.com> References: <1320175230-27980-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC PATCH 04/11] migrate_fd_cleanup: accept any negative qemu_fclose() value as error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Michael Roth , Juan Quintela 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 --- migration.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/migration.c b/migration.c index 3b4abbd..a98897c 100644 --- a/migration.c +++ b/migration.c @@ -172,9 +172,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) { -- 1.7.3.2