commit | dc3731783ead154d5a0d8d318566468474b43013 | [log] [tgz] |
---|---|---|
author | Rob Landley <rob@landley.net> | Fri Dec 27 18:45:01 2013 -0600 |
committer | Rob Landley <rob@landley.net> | Fri Dec 27 18:45:01 2013 -0600 |
tree | 9d57677eaceacbe64459f6bfb35944c5daa5db34 | |
parent | fc33eb78115adf8a90875f822706bdf3d462524c [diff] [blame] |
Pass through all the readfile() arguments from xreadfile().
diff --git a/lib/xwrap.c b/lib/xwrap.c index 08a93dd..ae296cd 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c
@@ -451,10 +451,10 @@ } } -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; }