2001-07-19 Ezra Peisach <epeisach@mit.edu>
+ * xdr_mem.c: Do not assume that XDR x_private field is char *.
+
* auth.h: AUTH ah_private structure element changed to void *.
* clnt.h: CLIENT cl_private structure element changed to type void *.
if ((xdrs->x_handy -= sizeof(rpc_int32)) < 0)
return (FALSE);
*lp = (long)ntohl(*((rpc_u_int32 *)(xdrs->x_private)));
- xdrs->x_private += sizeof(rpc_int32);
+ xdrs->x_private = (char *)xdrs->x_private + sizeof(rpc_int32);
return (TRUE);
}
if ((xdrs->x_handy -= sizeof(rpc_int32)) < 0)
return (FALSE);
*(rpc_int32 *)xdrs->x_private = (rpc_int32)htonl((rpc_u_int32)(*lp));
- xdrs->x_private += sizeof(rpc_int32);
+ xdrs->x_private = (char *)xdrs->x_private + sizeof(rpc_int32);
return (TRUE);
}
if ((xdrs->x_handy -= len) < 0)
return (FALSE);
memmove(addr, xdrs->x_private, len);
- xdrs->x_private += len;
+ xdrs->x_private = (char *)xdrs->x_private + len;
return (TRUE);
}
if ((xdrs->x_handy -= len) < 0)
return (FALSE);
memmove(xdrs->x_private, addr, len);
- xdrs->x_private += len;
+ xdrs->x_private = (char *)xdrs->x_private + len;
return (TRUE);
}
unsigned int pos;
{
register caddr_t newaddr = xdrs->x_base + pos;
- register caddr_t lastaddr = xdrs->x_private + xdrs->x_handy;
+ register caddr_t lastaddr = (char *) xdrs->x_private + xdrs->x_handy;
if ((long)newaddr > (long)lastaddr)
return (FALSE);
if (xdrs->x_handy >= len) {
xdrs->x_handy -= len;
buf = (rpc_int32 *) xdrs->x_private;
- xdrs->x_private += len;
+ xdrs->x_private = (char *)xdrs->x_private + len;
}
return (buf);
}