aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-12-30 14:55:38 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-12-30 14:55:38 +0000
commitec3ca1a2d360e8306ddf747c3b7f81d63f95b256 (patch)
tree38b0664d9e797b723f4afb25eef8546058e0c737 /lib
parentb93e2c954d4d649e9a6314bf52f7a1e7f0b3e7a6 (diff)
downloadsrc-ec3ca1a2d360e8306ddf747c3b7f81d63f95b256.tar.gz
src-ec3ca1a2d360e8306ddf747c3b7f81d63f95b256.zip
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/rpc/rpc_callmsg.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/lib/libc/rpc/rpc_callmsg.c b/lib/libc/rpc/rpc_callmsg.c
index 23ca32e14a06..14f50b921d1e 100644
--- a/lib/libc/rpc/rpc_callmsg.c
+++ b/lib/libc/rpc/rpc_callmsg.c
@@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)rpc_callmsg.c 2.1 88/07/29 4.0 RPCSRC";*/
-static char *rcsid = "$Id: rpc_callmsg.c,v 1.3 1995/10/22 14:51:33 phk Exp $";
+static char *rcsid = "$Id: rpc_callmsg.c,v 1.4 1996/06/08 22:54:55 jraynard Exp $";
#endif
/*
@@ -45,8 +45,6 @@ static char *rcsid = "$Id: rpc_callmsg.c,v 1.3 1995/10/22 14:51:33 phk Exp $";
#include <string.h>
#include <rpc/rpc.h>
-bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *ap);
-
/*
* XDR a call message
*/
@@ -55,7 +53,7 @@ xdr_callmsg(xdrs, cmsg)
register XDR *xdrs;
register struct rpc_msg *cmsg;
{
- register long *buf;
+ register int32_t *buf;
register struct opaque_auth *oa;
if (xdrs->x_op == XDR_ENCODE) {
@@ -86,16 +84,16 @@ xdr_callmsg(xdrs, cmsg)
IXDR_PUT_ENUM(buf, oa->oa_flavor);
IXDR_PUT_LONG(buf, oa->oa_length);
if (oa->oa_length) {
- bcopy(oa->oa_base, (caddr_t)buf, oa->oa_length);
- buf += RNDUP(oa->oa_length) / sizeof (long);
+ memcpy((caddr_t)buf, oa->oa_base, oa->oa_length);
+ buf += RNDUP(oa->oa_length) / sizeof (int32_t);
}
oa = &cmsg->rm_call.cb_verf;
IXDR_PUT_ENUM(buf, oa->oa_flavor);
IXDR_PUT_LONG(buf, oa->oa_length);
if (oa->oa_length) {
- bcopy(oa->oa_base, (caddr_t)buf, oa->oa_length);
+ memcpy((caddr_t)buf, oa->oa_base, oa->oa_length);
/* no real need....
- buf += RNDUP(oa->oa_length) / sizeof (long);
+ buf += RNDUP(oa->oa_length) / sizeof (int32_t);
*/
}
return (TRUE);
@@ -134,11 +132,11 @@ xdr_callmsg(xdrs, cmsg)
return (FALSE);
}
} else {
- bcopy((caddr_t)buf, oa->oa_base,
+ memcpy(oa->oa_base, (caddr_t)buf,
oa->oa_length);
/* no real need....
buf += RNDUP(oa->oa_length) /
- sizeof (long);
+ sizeof (int32_t);
*/
}
}
@@ -168,11 +166,11 @@ xdr_callmsg(xdrs, cmsg)
return (FALSE);
}
} else {
- bcopy((caddr_t)buf, oa->oa_base,
+ memcpy(oa->oa_base, (caddr_t)buf,
oa->oa_length);
/* no real need...
buf += RNDUP(oa->oa_length) /
- sizeof (long);
+ sizeof (int32_t);
*/
}
}
@@ -180,14 +178,14 @@ xdr_callmsg(xdrs, cmsg)
}
}
if (
- xdr_u_long(xdrs, &(cmsg->rm_xid)) &&
+ xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) &&
(cmsg->rm_direction == CALL) &&
- xdr_u_long(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+ xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
(cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
- xdr_u_long(xdrs, &(cmsg->rm_call.cb_prog)) &&
- xdr_u_long(xdrs, &(cmsg->rm_call.cb_vers)) &&
- xdr_u_long(xdrs, &(cmsg->rm_call.cb_proc)) &&
+ xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) &&
+ xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)) &&
+ xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_proc)) &&
xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_cred)) )
return (xdr_opaque_auth(xdrs, &(cmsg->rm_call.cb_verf)));
return (FALSE);