summaryrefslogtreecommitdiff
path: root/sunrpc/xdr_mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/xdr_mem.c')
-rw-r--r--sunrpc/xdr_mem.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sunrpc/xdr_mem.c b/sunrpc/xdr_mem.c
index 46a1f6f190..f4af0acb39 100644
--- a/sunrpc/xdr_mem.c
+++ b/sunrpc/xdr_mem.c
@@ -42,7 +42,7 @@
static bool_t xdrmem_getlong (XDR *, long *);
static bool_t xdrmem_putlong (XDR *, const long *);
-static bool_t xdrmem_getbytes (XDR *, caddr_t, u_int);
+static bool_t xdrmem_getbytes (XDR *, char *, u_int);
static bool_t xdrmem_putbytes (XDR *, const char *, u_int);
static u_int xdrmem_getpos (const XDR *);
static bool_t xdrmem_setpos (XDR *, u_int);
@@ -70,13 +70,13 @@ static const struct xdr_ops xdrmem_ops =
* memory buffer.
*/
void
-xdrmem_create (XDR *xdrs, const caddr_t addr, u_int size, enum xdr_op op)
+xdrmem_create (XDR *xdrs, const char *addr, u_int size, enum xdr_op op)
{
xdrs->x_op = op;
/* We have to add the const since the `struct xdr_ops' in `struct XDR'
is not `const'. */
xdrs->x_ops = (struct xdr_ops *) &xdrmem_ops;
- xdrs->x_private = xdrs->x_base = addr;
+ xdrs->x_private = xdrs->x_base = (char *)addr;
xdrs->x_handy = size;
}
#ifdef EXPORT_RPC_SYMBOLS
@@ -134,7 +134,7 @@ xdrmem_putlong (XDR *xdrs, const long *lp)
* a good idea. None of the things pointed to are const.
*/
static bool_t
-xdrmem_getbytes (XDR *xdrs, caddr_t addr, u_int len)
+xdrmem_getbytes (XDR *xdrs, char *addr, u_int len)
{
if (xdrs->x_handy < len)
return FALSE;
@@ -175,8 +175,8 @@ xdrmem_getpos (const XDR *xdrs)
static bool_t
xdrmem_setpos (XDR *xdrs, u_int pos)
{
- caddr_t newaddr = xdrs->x_base + pos;
- caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
+ char *newaddr = xdrs->x_base + pos;
+ char *lastaddr = xdrs->x_private + xdrs->x_handy;
size_t handy = lastaddr - newaddr;
if (newaddr > lastaddr