guestfsd.c: don't perform arithmetic on void pointers

* daemon/guestfsd.c (xread, xwrite): Use char* pointers instead.
This commit is contained in:
Jim Meyering
2009-08-17 09:24:47 +02:00
parent e82d864e02
commit ff2f3fc656

View File

@@ -273,9 +273,10 @@ sysroot_path (const char *path)
}
int
xwrite (int sock, const void *buf, size_t len)
xwrite (int sock, const void *v_buf, size_t len)
{
int r;
const char *buf = v_buf;
while (len > 0) {
r = write (sock, buf, len);
@@ -291,9 +292,10 @@ xwrite (int sock, const void *buf, size_t len)
}
int
xread (int sock, void *buf, size_t len)
xread (int sock, void *v_buf, size_t len)
{
int r;
char *buf = v_buf;
while (len > 0) {
r = read (sock, buf, len);