diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2004-02-23 08:11:07 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2004-02-23 08:11:07 +0000 |
commit | 181f0773e252b3eb437355f7e8395a120a00d590 (patch) | |
tree | 2166e6438c4fcf40638548ad543872f094923510 | |
parent | a9d8f9c7bf0a05e0e29cb1ed00559f344e23819b (diff) | |
download | busybox-w32-181f0773e252b3eb437355f7e8395a120a00d590.tar.gz busybox-w32-181f0773e252b3eb437355f7e8395a120a00d590.tar.bz2 busybox-w32-181f0773e252b3eb437355f7e8395a120a00d590.zip |
bb_full_fd_action was incorrectly returning an error message causing
major breaking.
-rw-r--r-- | libbb/copyfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 9ab83728c..00115e2c9 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c | |||
@@ -50,8 +50,8 @@ static size_t bb_full_fd_action(int src_fd, int dst_fd, const size_t size) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | read_actual = safe_read(src_fd, buffer, read_try); | 52 | read_actual = safe_read(src_fd, buffer, read_try); |
53 | if ((read_actual > 0) && (dst_fd >= 0)) { | 53 | if (read_actual > 0) { |
54 | if (bb_full_write(dst_fd, buffer, (size_t) read_actual) != read_actual) { | 54 | if ((dst_fd >= 0) && (bb_full_write(dst_fd, buffer, (size_t) read_actual) != read_actual)) { |
55 | bb_perror_msg(bb_msg_write_error); /* match Read error below */ | 55 | bb_perror_msg(bb_msg_write_error); /* match Read error below */ |
56 | break; | 56 | break; |
57 | } | 57 | } |