aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2004-11-05 05:39:37 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2004-11-05 05:39:37 +0000
commitf52188fc8ab873452e468cc17cf1e8a3eb13e63b (patch)
tree9240c4351897a9500829200aedce1e0eb3552d07 /usr.bin
parentb772d06c7731ec9f5fca7fa8e29a96f7eaee1a27 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tar/Makefile2
-rw-r--r--usr.bin/tar/write.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile
index 21f9f2e1aa47f..f5b86fb92edd1 100644
--- a/usr.bin/tar/Makefile
+++ b/usr.bin/tar/Makefile
@@ -6,7 +6,7 @@
#
PROG= bsdtar
-VERSION= 1.01.011
+VERSION= 1.01.015
SRCS= bsdtar.c matching.c read.c util.c write.c
WARNS?= 6
DPADD= ${LIBARCHIVE} ${LIBBZ2} ${LIBZ}
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c
index e1e0a23d5c3fa..a9dec7262cd8f 100644
--- a/usr.bin/tar/write.c
+++ b/usr.bin/tar/write.c
@@ -875,10 +875,8 @@ write_file_data(struct bsdtar *bsdtar, struct archive *a, int fd)
bytes_read = read(fd, buff, sizeof(buff));
while (bytes_read > 0) {
bytes_written = archive_write_data(a, buff, bytes_read);
-
- if (bytes_written == 0 && errno) {
- return -1; /* Write failed; this is bad */
- }
+ if (bytes_written <= 0)
+ return (-1); /* Write failed; this is bad */
bytes_read = read(fd, buff, sizeof(buff));
}
return 0;