summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorFlorian Forster <octo@verplant.org>2006-06-18 17:18:09 +0200
committerJunio C Hamano <junkio@cox.net>2006-06-20 01:59:46 -0700
commit1d7f171c3a456b980d821ee0f68e01535a5f7e36 (patch)
tree040ae96db3e2d18f84a95cc46ec4d7626bcc1994 /http.c
parent2bda77e080dd8d47ca0b87c78e9061fbaa37455a (diff)
downloadgit-1d7f171c3a456b980d821ee0f68e01535a5f7e36.tar.gz
Remove all void-pointer arithmetic.
ANSI C99 doesn't allow void-pointer arithmetic. This patch fixes this in various ways. Usually the strategy that required the least changes was used. Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http.c')
-rw-r--r--http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http.c b/http.c
index 08769cc7cd..6c1937b676 100644
--- a/http.c
+++ b/http.c
@@ -34,7 +34,7 @@ size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb,
size_t size = eltsize * nmemb;
if (size > buffer->size - buffer->posn)
size = buffer->size - buffer->posn;
- memcpy(ptr, buffer->buffer + buffer->posn, size);
+ memcpy(ptr, (char *) buffer->buffer + buffer->posn, size);
buffer->posn += size;
return size;
}
@@ -49,7 +49,7 @@ size_t fwrite_buffer(const void *ptr, size_t eltsize,
buffer->size = buffer->posn + size;
buffer->buffer = xrealloc(buffer->buffer, buffer->size);
}
- memcpy(buffer->buffer + buffer->posn, ptr, size);
+ memcpy((char *) buffer->buffer + buffer->posn, ptr, size);
buffer->posn += size;
data_received++;
return size;