From 1d7f171c3a456b980d821ee0f68e01535a5f7e36 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 18 Jun 2006 17:18:09 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- pkt-line.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkt-line.c') 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) -- cgit v1.2.1