aboutsummaryrefslogtreecommitdiffstats
path: root/community/blind/fix-readall.patch
blob: 1e5ebfdacb10a532178ce18a88781867459ae462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
 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