From: Jim Meyering Date: Mon, 17 Aug 2009 07:24:47 +0000 (+0200) Subject: guestfsd.c: don't perform arithmetic on void pointers X-Git-Tag: 1.0.68~43 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=ff2f3fc656b62ba4291ddb4a7238426c446db7c3 guestfsd.c: don't perform arithmetic on void pointers * daemon/guestfsd.c (xread, xwrite): Use char* pointers instead. --- diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c index fad49fb..ad3ce15 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);