diff options
author | Junio C Hamano <junkio@cox.net> | 2006-06-21 03:51:59 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-06-21 03:51:59 -0700 |
commit | 9d24ed4f019e035eeb8125c2c595876ad1211a3a (patch) | |
tree | c9841029a92f8f5d509eacdc88f7e6364b40ec2c /pkt-line.c | |
parent | 3bec0da08d6df03a103ddc4237cf2c79992c7dd4 (diff) | |
parent | 1d7f171c3a456b980d821ee0f68e01535a5f7e36 (diff) | |
download | git-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.c | 4 |
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) |