From: Glenn L McGrath Date: Mon, 23 Feb 2004 08:11:07 +0000 (-0000) Subject: bb_full_fd_action was incorrectly returning an error message causing X-Git-Tag: 1_00_pre8~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=181f0773e252b3eb437355f7e8395a120a00d590;p=platform%2Fupstream%2Fbusybox.git bb_full_fd_action was incorrectly returning an error message causing major breaking. --- diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 9ab8372..00115e2 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) } read_actual = safe_read(src_fd, buffer, read_try); - if ((read_actual > 0) && (dst_fd >= 0)) { - if (bb_full_write(dst_fd, buffer, (size_t) read_actual) != read_actual) { + if (read_actual > 0) { + if ((dst_fd >= 0) && (bb_full_write(dst_fd, buffer, (size_t) read_actual) != read_actual)) { bb_perror_msg(bb_msg_write_error); /* match Read error below */ break; }