From 15b231591d3e95d502b2cee1d7d6192177230c15 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 18 Jul 2008 04:15:59 -0500 Subject: Bug spotted by Roberto Foglietta: at EOF readall() should return count, not len. --- lib/lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/lib.c b/lib/lib.c index 8467f866..959cd46c 100644 --- a/lib/lib.c +++ b/lib/lib.c @@ -219,9 +219,10 @@ FILE *xfopen(char *path, char *mode) ssize_t readall(int fd, void *buf, size_t len) { size_t count = 0; + while (count