summaryrefslogtreecommitdiff
path: root/builtin-apply.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 /builtin-apply.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 'builtin-apply.c')
-rw-r--r--builtin-apply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index e113c74dd8..6dd0472ae0 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -148,7 +148,7 @@ static void *read_patch_file(int fd, unsigned long *sizep)
buffer = xrealloc(buffer, alloc);
nr = alloc - size;
}
- nr = xread(fd, buffer + size, nr);
+ nr = xread(fd, (char *) buffer + size, nr);
if (!nr)
break;
if (nr < 0)
@@ -164,7 +164,7 @@ static void *read_patch_file(int fd, unsigned long *sizep)
*/
if (alloc < size + SLOP)
buffer = xrealloc(buffer, size + SLOP);
- memset(buffer + size, 0, SLOP);
+ memset((char *) buffer + size, 0, SLOP);
return buffer;
}
@@ -1194,7 +1194,7 @@ static int read_old_data(struct stat *st, const char *path, void *buf, unsigned
return error("unable to open %s", path);
got = 0;
for (;;) {
- int ret = xread(fd, buf + got, size - got);
+ int ret = xread(fd, (char *) buf + got, size - got);
if (ret <= 0)
break;
got += ret;