aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-11-28 16:57:45 -0600
committerRob Landley <rob@landley.net>2014-11-28 16:57:45 -0600
commit6d28370f22aa6b7c97a57a434339fa57ce322c8b (patch)
treeaef571be4d3c5671414a6246962405b542675e93
parent75fea678c039381b310d15a86d698cba7ec9805d (diff)
downloadtoybox-6d28370f22aa6b7c97a57a434339fa57ce322c8b.tar.gz
Make sendfile use libbuf.
-rw-r--r--lib/xwrap.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 6216d918..a2dd1c69 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -587,13 +587,12 @@ void xpidfile(char *name)
void xsendfile(int in, int out)
{
long len;
- char buf[4096];
if (in<0) return;
for (;;) {
- len = xread(in, buf, 4096);
+ len = xread(in, libbuf, sizeof(libbuf));
if (len<1) break;
- xwrite(out, buf, len);
+ xwrite(out, libbuf, len);
}
}