From 6d28370f22aa6b7c97a57a434339fa57ce322c8b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 28 Nov 2014 16:57:45 -0600 Subject: Make sendfile use libbuf. --- lib/xwrap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') 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); } } -- cgit v1.2.3