summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-17 09:24:47 +0200
committerJim Meyering <meyering@redhat.com>2009-08-17 11:40:24 +0200
commitff2f3fc656b62ba4291ddb4a7238426c446db7c3 (patch)
treefb0d7f53e971ca4dfb0943107390136fbd0690be /daemon
parente82d864e02f7ab36881c6cda2798bb76370ee6c7 (diff)
downloadlibguestfs-ff2f3fc656b62ba4291ddb4a7238426c446db7c3.tar.gz
libguestfs-ff2f3fc656b62ba4291ddb4a7238426c446db7c3.tar.xz
libguestfs-ff2f3fc656b62ba4291ddb4a7238426c446db7c3.zip
guestfsd.c: don't perform arithmetic on void pointers
* daemon/guestfsd.c (xread, xwrite): Use char* pointers instead.
Diffstat (limited to 'daemon')
-rw-r--r--daemon/guestfsd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index fad49fb6..ad3ce15e 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -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);