projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a9de6d0
)
qemu-ga: qmp_guest_file_close(): fix fclose() error check
author
Luiz Capitulino
<lcapitulino@redhat.com>
Tue, 27 Nov 2012 13:01:56 +0000
(11:01 -0200)
committer
Michael Roth
<mdroth@linux.vnet.ibm.com>
Tue, 8 Jan 2013 22:38:10 +0000
(16:38 -0600)
fclose() returns EOF on error.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/commands-posix.c
patch
|
blob
|
history
diff --git
a/qga/commands-posix.c
b/qga/commands-posix.c
index bbef66dc6a47b0be3d0cd3f046e7685d4bb62a7d..ebb58be22e104243dfbd00663030f7c9319549a3 100644
(file)
--- 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;
}