From dc3731783ead154d5a0d8d318566468474b43013 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 27 Dec 2013 18:45:01 -0600 Subject: Pass through all the readfile() arguments from xreadfile(). --- lib/xwrap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/xwrap.c') diff --git a/lib/xwrap.c b/lib/xwrap.c index 08a93ddf..ae296cd6 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -451,10 +451,10 @@ char *xreadlink(char *name) } } -char *xreadfile(char *name) +char *xreadfile(char *name, char *buf, off_t len) { - char *buf = readfile(name, 0, 0); - if (!buf) perror_exit("xreadfile %s", name); + if (!(buf = readfile(name, buf, len))) perror_exit("Bad '%s'", name); + return buf; } -- cgit v1.2.3