summaryrefslogtreecommitdiff
path: root/libbb/copyfd.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-24 14:55:23 +0000
committerDenis Vlasenko2006-11-24 14:55:23 +0000
commit4fbb584a0e6ee086d6b30936c7124c687b3e977f (patch)
tree279f3ff5c1a47d36ad4eec248240f11c7ef8d438 /libbb/copyfd.c
parent0b35470d9b5e75a7a1df2e6860b48831e7920353 (diff)
downloadbusybox-4fbb584a0e6ee086d6b30936c7124c687b3e977f.zip
busybox-4fbb584a0e6ee086d6b30936c7124c687b3e977f.tar.gz
tar: cry murder and bail out if file shrinks under us while we tar it up
Diffstat (limited to 'libbb/copyfd.c')
-rw-r--r--libbb/copyfd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/copyfd.c b/libbb/copyfd.c
index 87126eb..601c51c 100644
--- a/libbb/copyfd.c
+++ b/libbb/copyfd.c
@@ -46,8 +46,7 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size)
} else if (rd < 0) {
bb_perror_msg(bb_msg_read_error);
break;
- } else if (rd == 0) {
- /* All done. */
+ } else { /* eof - all done. */
status = 0;
break;
}