From 6d28370f22aa6b7c97a57a434339fa57ce322c8b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 28 Nov 2014 16:57:45 -0600 Subject: [PATCH] Make sendfile use libbuf. --- lib/xwrap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/xwrap.c b/lib/xwrap.c index 6216d91..a2dd1c6 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); } } -- 2.7.4