From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsiEI-0006Fe-Tf for qemu-devel@nongnu.org; Tue, 08 Jan 2013 18:05:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsiEH-0006ei-LF for qemu-devel@nongnu.org; Tue, 08 Jan 2013 18:05:10 -0500 Received: from mail-ie0-f182.google.com ([209.85.223.182]:40798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsiEH-0006e3-Hl for qemu-devel@nongnu.org; Tue, 08 Jan 2013 18:05:09 -0500 Received: by mail-ie0-f182.google.com with SMTP id s9so1277586iec.13 for ; Tue, 08 Jan 2013 15:05:09 -0800 (PST) Sender: fluxion From: Michael Roth Date: Tue, 8 Jan 2013 16:59:59 -0600 Message-Id: <1357686009-13139-3-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1357686009-13139-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1357686009-13139-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 02/12] qemu-ga: qmp_guest_file_close(): fix fclose() error check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, tomoki.sekiyama.qu@hitachi.com, lcapitulino@redhat.com From: Luiz Capitulino fclose() returns EOF on error. Signed-off-by: Luiz Capitulino Reviewed-by: Michael Roth Signed-off-by: Michael Roth --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index bbef66d..ebb58be 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -170,7 +170,7 @@ void qmp_guest_file_close(int64_t handle, Error **err) } ret = fclose(gfh->fh); - if (ret == -1) { + if (ret == EOF) { error_set(err, QERR_QGA_COMMAND_FAILED, "fclose() failed"); return; } -- 1.7.9.5