From: Richard Jones Date: Sun, 26 Apr 2009 08:51:48 +0000 (+0100) Subject: Use ferror to check for error conditions in pipe. X-Git-Tag: 1.0.13~6 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a30f66436eac79b9e532e448882d03375c0d5e78;p=libguestfs.git Use ferror to check for error conditions in pipe. --- diff --git a/daemon/tar.c b/daemon/tar.c index ecf919d..a33ec3a 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);