summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 5d4e004..8d0fa8c 100644
--- a/util.c
+++ b/util.c
@@ -54,7 +54,7 @@ int get(char *host, char *path, char **buf) {
}
*buf = malloc(sizeof(char *) * 4096);
- for(i=0, l=0; (res = fread(*buf+l, 1, 4096, srv)) > 0; l+=res, i++)
+ for(l=0; (res = fread(*buf+l, 1, 4096, srv)) > 0; l+=res)
*buf = realloc(*buf, sizeof(char *) * (l+4096));
return l;