aboutsummaryrefslogblamecommitdiffstats
path: root/community/blind/fix-readall.patch
blob: 1e5ebfdacb10a532178ce18a88781867459ae462 (plain) (tree)






















                                                        
---
 src/util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util.c b/src/util.c
index 6c1bd0a..8967392 100644
--- a/src/util.c
+++ b/src/util.c
@@ -136,9 +136,9 @@ readall(int fd, void *buf, size_t n)
 			return -1;
 		if (r == 0)
 			break;
-		r += (size_t)r;
+		ptr += (size_t)r;
 	}
-	return r;
+	return ptr;
 }
 
 int
-- 
2.11.1