summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNick White <hg@njw.me.uk>2011-07-16 15:07:28 +0100
committerNick White <hg@njw.me.uk>2011-07-16 15:07:28 +0100
commit4d6350f4adef68ddb9aeb8a19c81ff7bbbffba98 (patch)
tree0944c8ba8ecea3cef395974c6edf90e1cb649835 /util.c
parentc11e80d46df7cec80de52383db6cb7d8dc7d3ce0 (diff)
Little further get() cleanup
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;