From 361de173a51d53d0a8988872aa3be21440c7e1ba Mon Sep 17 00:00:00 2001 From: Stefan Farfeleder Date: Fri, 13 Aug 2004 23:22:38 +0000 Subject: [PATCH] Avoid using void pointers in additive expressions. PR: 56653 (libc/rpc bits) Approved by: alfred --- lib/libc/rpc/clnt_vc.c | 2 +- lib/libc/rpc/svc_vc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c index 824a85570d4..f1a8e2010da 100644 --- a/lib/libc/rpc/clnt_vc.c +++ b/lib/libc/rpc/clnt_vc.c @@ -738,7 +738,7 @@ write_vc(ctp, buf, len) } } } else { - for (cnt = len; cnt > 0; cnt -= i, buf += i) { + for (cnt = len; cnt > 0; cnt -= i, buf = (char *)buf + i) { if ((i = _write(ct->ct_fd, buf, (size_t)cnt)) == -1) { ct->ct_error.re_errno = errno; ct->ct_error.re_status = RPC_CANTSEND; diff --git a/lib/libc/rpc/svc_vc.c b/lib/libc/rpc/svc_vc.c index a43adbf631e..283b250d6ea 100644 --- a/lib/libc/rpc/svc_vc.c +++ b/lib/libc/rpc/svc_vc.c @@ -541,7 +541,7 @@ write_vc(xprtp, buf, len) if (cd->nonblock) gettimeofday(&tv0, NULL); - for (cnt = len; cnt > 0; cnt -= i, buf += i) { + for (cnt = len; cnt > 0; cnt -= i, buf = (char *)buf + i) { i = _write(xprt->xp_fd, buf, (size_t)cnt); if (i < 0) { if (errno != EAGAIN || !cd->nonblock) {