summaryrefslogtreecommitdiffstats
path: root/daemon/tar.c
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-26 09:51:48 +0100
committerRichard Jones <rjones@redhat.com>2009-04-26 09:51:48 +0100
commita30f66436eac79b9e532e448882d03375c0d5e78 (patch)
tree79ba99d5b785e962f98daf7a17af1b566b30a7fb /daemon/tar.c
parent38f9222d21fb3c3005872de05247ff16a66db945 (diff)
downloadlibguestfs-a30f66436eac79b9e532e448882d03375c0d5e78.tar.gz
libguestfs-a30f66436eac79b9e532e448882d03375c0d5e78.tar.xz
libguestfs-a30f66436eac79b9e532e448882d03375c0d5e78.zip
Use ferror to check for error conditions in pipe.
Diffstat (limited to 'daemon/tar.c')
-rw-r--r--daemon/tar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/daemon/tar.c b/daemon/tar.c
index ecf919db..a33ec3a0 100644
--- a/daemon/tar.c
+++ b/daemon/tar.c
@@ -139,7 +139,7 @@ do_tar_out (const char *dir)
}
}
- if (r == -1) {
+ if (ferror (fp)) {
perror (dir);
send_file_end (1); /* Cancel. */
pclose (fp);
@@ -261,7 +261,7 @@ do_tgz_out (const char *dir)
}
}
- if (r == -1) {
+ if (ferror (fp)) {
perror (dir);
send_file_end (1); /* Cancel. */
pclose (fp);