summaryrefslogtreecommitdiff
path: root/pkt-line.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2006-06-21 03:51:59 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-06-21 03:51:59 -0700
commit9d24ed4f019e035eeb8125c2c595876ad1211a3a (patch)
treec9841029a92f8f5d509eacdc88f7e6364b40ec2c /pkt-line.c
parentMerge branch 'jc/upload-corrupt' into next (diff)
parentRemove all void-pointer arithmetic. (diff)
downloadtgif-9d24ed4f019e035eeb8125c2c595876ad1211a3a.tar.xz
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)