Signed-off-by: Matteo Cafasso <noxdafox(a)gmail.com>
---
daemon/upload.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/daemon/upload.c b/daemon/upload.c
index 655baf29d..dc467d62b 100644
--- a/daemon/upload.c
+++ b/daemon/upload.c
@@ -27,6 +27,8 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include "ignore-value.h"
+
#include "guestfs_protocol.h"
#include "daemon.h"
#include "actions.h"
@@ -68,7 +70,7 @@ upload (const char *filename, int flags, int64_t offset)
if (!is_dev) CHROOT_OUT;
if (data.fd == -1) {
err = errno;
- r = cancel_receive ();
+ ignore_value (cancel_receive ());
errno = err;
reply_with_perror ("%s", filename);
return -1;
@@ -77,7 +79,7 @@ upload (const char *filename, int flags, int64_t offset)
if (offset) {
if (lseek (data.fd, offset, SEEK_SET) == -1) {
err = errno;
- r = cancel_receive ();
+ ignore_value (cancel_receive ());
errno = err;
reply_with_perror ("lseek: %s", filename);
return -1;
@@ -87,7 +89,7 @@ upload (const char *filename, int flags, int64_t offset)
r = receive_file (write_cb, &data);
if (r == -1) { /* write error */
err = errno;
- r = cancel_receive ();
+ ignore_value (cancel_receive ());
errno = err;
reply_with_error ("write error: %s", filename);
close (data.fd);
--
2.11.0