diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-26 09:51:48 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-26 09:51:48 +0100 |
commit | a30f66436eac79b9e532e448882d03375c0d5e78 (patch) | |
tree | 79ba99d5b785e962f98daf7a17af1b566b30a7fb | |
parent | 38f9222d21fb3c3005872de05247ff16a66db945 (diff) | |
download | libguestfs-a30f66436eac79b9e532e448882d03375c0d5e78.tar.gz libguestfs-a30f66436eac79b9e532e448882d03375c0d5e78.tar.xz libguestfs-a30f66436eac79b9e532e448882d03375c0d5e78.zip |
Use ferror to check for error conditions in pipe.
-rw-r--r-- | daemon/tar.c | 4 |
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); |