aboutsummaryrefslogtreecommitdiff
path: root/pkt-line.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 /pkt-line.c
parent2bda77e080dd8d47ca0b87c78e9061fbaa37455a (diff)
downloadgit-1d7f171c3a456b980d821ee0f68e01535a5f7e36.tar.gz
git-1d7f171c3a456b980d821ee0f68e01535a5f7e36.tar.xz
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 'pkt-line.c')
-rw-r--r--pkt-line.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkt-line.c b/pkt-line.c
index bb3bab05c..44d42969e 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -21,7 +21,7 @@ static void safe_write(int fd, const void *buf, unsigned n)
while (n) {
int ret = xwrite(fd, buf, n);
if (ret > 0) {
- buf += ret;
+ buf = (char *) buf + ret;
n -= ret;
continue;
}
@@ -66,7 +66,7 @@ static void safe_read(int fd, void *buffer, unsigned size)
int n = 0;
while (n < size) {
- int ret = xread(fd, buffer + n, size - n);
+ int ret = xread(fd, (char *) buffer + n, size - n);
if (ret < 0)
die("read error (%s)", strerror(errno));
if (!ret)