summaryrefslogtreecommitdiff
path: root/pkt-line.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-06-21 03:51:59 -0700
committerJunio C Hamano <junkio@cox.net>2006-06-21 03:51:59 -0700
commit9d24ed4f019e035eeb8125c2c595876ad1211a3a (patch)
treec9841029a92f8f5d509eacdc88f7e6364b40ec2c /pkt-line.c
parent3bec0da08d6df03a103ddc4237cf2c79992c7dd4 (diff)
parent1d7f171c3a456b980d821ee0f68e01535a5f7e36 (diff)
downloadgit-9d24ed4f019e035eeb8125c2c595876ad1211a3a.tar.gz
Merge branch 'ff/c99' into next
* ff/c99: Remove all void-pointer arithmetic.
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 3d724acf23..c1e81f976f 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -22,7 +22,7 @@ ssize_t safe_write(int fd, const void *buf, ssize_t n)
while (n) {
int ret = xwrite(fd, buf, n);
if (ret > 0) {
- buf += ret;
+ buf = (char *) buf + ret;
n -= ret;
continue;
}
@@ -68,7 +68,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)