diff options
author | Rob Landley <rob@landley.net> | 2014-11-28 16:57:45 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-11-28 16:57:45 -0600 |
commit | 6d28370f22aa6b7c97a57a434339fa57ce322c8b (patch) | |
tree | aef571be4d3c5671414a6246962405b542675e93 /lib | |
parent | 75fea678c039381b310d15a86d698cba7ec9805d (diff) | |
download | toybox-6d28370f22aa6b7c97a57a434339fa57ce322c8b.tar.gz |
Make sendfile use libbuf.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xwrap.c | 5 |
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); } } |