summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/rpc/authdes_prot.c3
-rw-r--r--lib/libc/rpc/authunix_prot.c5
-rw-r--r--lib/libc/rpc/key_prot_xdr.c4
-rw-r--r--lib/libc/rpc/rpc_callmsg.c4
-rw-r--r--lib/libc/rpc/rpc_prot.c29
-rw-r--r--lib/libc/rpc/rpcb_prot.c4
-rw-r--r--lib/libc/rpc/rpcb_st_xdr.c13
7 files changed, 47 insertions, 15 deletions
diff --git a/lib/libc/rpc/authdes_prot.c b/lib/libc/rpc/authdes_prot.c
index 19969b0..5be1f12 100644
--- a/lib/libc/rpc/authdes_prot.c
+++ b/lib/libc/rpc/authdes_prot.c
@@ -54,10 +54,11 @@ xdr_authdes_cred(xdrs, cred)
XDR *xdrs;
struct authdes_cred *cred;
{
+ enum authdes_namekind *padc_namekind = &cred->adc_namekind;
/*
* Unrolled xdr
*/
- ATTEMPT(xdr_enum(xdrs, (enum_t *)&cred->adc_namekind));
+ ATTEMPT(xdr_enum(xdrs, (enum_t *) padc_namekind));
switch (cred->adc_namekind) {
case ADN_FULLNAME:
ATTEMPT(xdr_string(xdrs, &cred->adc_fullname.name,
diff --git a/lib/libc/rpc/authunix_prot.c b/lib/libc/rpc/authunix_prot.c
index 441ba40..7699e28 100644
--- a/lib/libc/rpc/authunix_prot.c
+++ b/lib/libc/rpc/authunix_prot.c
@@ -60,15 +60,18 @@ xdr_authunix_parms(xdrs, p)
XDR *xdrs;
struct authunix_parms *p;
{
+ int **paup_gids;
assert(xdrs != NULL);
assert(p != NULL);
+ paup_gids = &p->aup_gids;
+
if (xdr_u_long(xdrs, &(p->aup_time))
&& xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME)
&& xdr_int(xdrs, &(p->aup_uid))
&& xdr_int(xdrs, &(p->aup_gid))
- && xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
+ && xdr_array(xdrs, (char **) paup_gids,
&(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) {
return (TRUE);
}
diff --git a/lib/libc/rpc/key_prot_xdr.c b/lib/libc/rpc/key_prot_xdr.c
index 18b1328..bcead6a 100644
--- a/lib/libc/rpc/key_prot_xdr.c
+++ b/lib/libc/rpc/key_prot_xdr.c
@@ -117,12 +117,14 @@ xdr_cryptkeyres(register XDR *xdrs, cryptkeyres *objp)
bool_t
xdr_unixcred(register XDR *xdrs, unixcred *objp)
{
+ u_int **pgids_val;
if (!xdr_u_int(xdrs, &objp->uid))
return (FALSE);
if (!xdr_u_int(xdrs, &objp->gid))
return (FALSE);
- if (!xdr_array(xdrs, (char **)&objp->gids.gids_val, (u_int *) &objp->gids.gids_len, MAXGIDS,
+ pgids_val = &objp->gids.gids_val;
+ if (!xdr_array(xdrs, (char **) pgids_val, (u_int *) &objp->gids.gids_len, MAXGIDS,
sizeof (u_int), (xdrproc_t) xdr_u_int))
return (FALSE);
return (TRUE);
diff --git a/lib/libc/rpc/rpc_callmsg.c b/lib/libc/rpc/rpc_callmsg.c
index b9b64f5..ad1bdb3 100644
--- a/lib/libc/rpc/rpc_callmsg.c
+++ b/lib/libc/rpc/rpc_callmsg.c
@@ -59,6 +59,7 @@ xdr_callmsg(xdrs, cmsg)
XDR *xdrs;
struct rpc_msg *cmsg;
{
+ enum msg_type *prm_direction;
int32_t *buf;
struct opaque_auth *oa;
@@ -190,9 +191,10 @@ xdr_callmsg(xdrs, cmsg)
return (TRUE);
}
}
+ prm_direction = &cmsg->rm_direction;
if (
xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
- xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) &&
+ xdr_enum(xdrs, (enum_t *) prm_direction) &&
(cmsg->rm_direction == CALL) &&
xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
(cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
diff --git a/lib/libc/rpc/rpc_prot.c b/lib/libc/rpc/rpc_prot.c
index 87278e7..2a4b575 100644
--- a/lib/libc/rpc/rpc_prot.c
+++ b/lib/libc/rpc/rpc_prot.c
@@ -108,14 +108,17 @@ xdr_accepted_reply(xdrs, ar)
XDR *xdrs;
struct accepted_reply *ar;
{
+ enum accept_stat *par_stat;
assert(xdrs != NULL);
assert(ar != NULL);
+ par_stat = &ar->ar_stat;
+
/* personalized union, rather than calling xdr_union */
if (! xdr_opaque_auth(xdrs, &(ar->ar_verf)))
return (FALSE);
- if (! xdr_enum(xdrs, (enum_t *)&(ar->ar_stat)))
+ if (! xdr_enum(xdrs, (enum_t *) par_stat))
return (FALSE);
switch (ar->ar_stat) {
@@ -144,12 +147,16 @@ xdr_rejected_reply(xdrs, rr)
XDR *xdrs;
struct rejected_reply *rr;
{
+ enum reject_stat *prj_stat;
+ enum auth_stat *prj_why;
assert(xdrs != NULL);
assert(rr != NULL);
+ prj_stat = &rr->rj_stat;
+
/* personalized union, rather than calling xdr_union */
- if (! xdr_enum(xdrs, (enum_t *)&(rr->rj_stat)))
+ if (! xdr_enum(xdrs, (enum_t *) prj_stat))
return (FALSE);
switch (rr->rj_stat) {
@@ -159,7 +166,8 @@ xdr_rejected_reply(xdrs, rr)
return (xdr_u_int32_t(xdrs, &(rr->rj_vers.high)));
case AUTH_ERROR:
- return (xdr_enum(xdrs, (enum_t *)&(rr->rj_why)));
+ prj_why = &rr->rj_why;
+ return (xdr_enum(xdrs, (enum_t *) prj_why));
}
/* NOTREACHED */
assert(0);
@@ -179,14 +187,20 @@ xdr_replymsg(xdrs, rmsg)
XDR *xdrs;
struct rpc_msg *rmsg;
{
+ enum msg_type *prm_direction;
+ enum reply_stat *prp_stat;
+
assert(xdrs != NULL);
assert(rmsg != NULL);
+ prm_direction = &rmsg->rm_direction;
+ prp_stat = &rmsg->rm_reply.rp_stat;
+
if (
xdr_u_int32_t(xdrs, &(rmsg->rm_xid)) &&
- xdr_enum(xdrs, (enum_t *)&(rmsg->rm_direction)) &&
+ xdr_enum(xdrs, (enum_t *) prm_direction) &&
(rmsg->rm_direction == REPLY) )
- return (xdr_union(xdrs, (enum_t *)&(rmsg->rm_reply.rp_stat),
+ return (xdr_union(xdrs, (enum_t *) prp_stat,
(caddr_t)(void *)&(rmsg->rm_reply.ru), reply_dscrm,
NULL_xdrproc_t));
return (FALSE);
@@ -203,16 +217,19 @@ xdr_callhdr(xdrs, cmsg)
XDR *xdrs;
struct rpc_msg *cmsg;
{
+ enum msg_type *prm_direction;
assert(xdrs != NULL);
assert(cmsg != NULL);
+ prm_direction = &cmsg->rm_direction;
+
cmsg->rm_direction = CALL;
cmsg->rm_call.cb_rpcvers = RPC_MSG_VERSION;
if (
(xdrs->x_op == XDR_ENCODE) &&
xdr_u_int32_t(xdrs, &(cmsg->rm_xid)) &&
- xdr_enum(xdrs, (enum_t *)&(cmsg->rm_direction)) &&
+ xdr_enum(xdrs, (enum_t *) prm_direction) &&
xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_prog)) )
return (xdr_u_int32_t(xdrs, &(cmsg->rm_call.cb_vers)));
diff --git a/lib/libc/rpc/rpcb_prot.c b/lib/libc/rpc/rpcb_prot.c
index 5c199d8..f766749 100644
--- a/lib/libc/rpc/rpcb_prot.c
+++ b/lib/libc/rpc/rpcb_prot.c
@@ -320,11 +320,13 @@ xdr_netbuf(xdrs, objp)
struct netbuf *objp;
{
bool_t dummy;
+ void **pp;
if (!xdr_u_int32_t(xdrs, (u_int32_t *) &objp->maxlen)) {
return (FALSE);
}
- dummy = xdr_bytes(xdrs, (char **)&(objp->buf),
+ pp = &objp->buf;
+ dummy = xdr_bytes(xdrs, (char **) pp,
(u_int *)&(objp->len), objp->maxlen);
return (dummy);
}
diff --git a/lib/libc/rpc/rpcb_st_xdr.c b/lib/libc/rpc/rpcb_st_xdr.c
index 7ca2ba9..cf1e227 100644
--- a/lib/libc/rpc/rpcb_st_xdr.c
+++ b/lib/libc/rpc/rpcb_st_xdr.c
@@ -52,6 +52,7 @@ xdr_rpcbs_addrlist(xdrs, objp)
XDR *xdrs;
rpcbs_addrlist *objp;
{
+ struct rpcbs_addrlist **pnext;
if (!xdr_u_int32_t(xdrs, &objp->prog)) {
return (FALSE);
@@ -69,7 +70,9 @@ xdr_rpcbs_addrlist(xdrs, objp)
return (FALSE);
}
- if (!xdr_pointer(xdrs, (char **)&objp->next,
+ pnext = &objp->next;
+
+ if (!xdr_pointer(xdrs, (char **) pnext,
sizeof (rpcbs_addrlist),
(xdrproc_t)xdr_rpcbs_addrlist)) {
return (FALSE);
@@ -86,6 +89,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
rpcbs_rmtcalllist *objp;
{
int32_t *buf;
+ struct rpcbs_rmtcalllist **pnext;
if (xdrs->x_op == XDR_ENCODE) {
buf = XDR_INLINE(xdrs, 6 * BYTES_PER_XDR_UNIT);
@@ -119,7 +123,8 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
return (FALSE);
}
- if (!xdr_pointer(xdrs, (char **)&objp->next,
+ pnext = &objp->next;
+ if (!xdr_pointer(xdrs, (char **) pnext,
sizeof (rpcbs_rmtcalllist),
(xdrproc_t)xdr_rpcbs_rmtcalllist)) {
return (FALSE);
@@ -157,7 +162,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
return (FALSE);
}
- if (!xdr_pointer(xdrs, (char **)&objp->next,
+ if (!xdr_pointer(xdrs, (char **) pnext,
sizeof (rpcbs_rmtcalllist),
(xdrproc_t)xdr_rpcbs_rmtcalllist)) {
return (FALSE);
@@ -185,7 +190,7 @@ xdr_rpcbs_rmtcalllist(xdrs, objp)
if (!xdr_string(xdrs, &objp->netid, (u_int)~0)) {
return (FALSE);
}
- if (!xdr_pointer(xdrs, (char **)&objp->next,
+ if (!xdr_pointer(xdrs, (char **) pnext,
sizeof (rpcbs_rmtcalllist),
(xdrproc_t)xdr_rpcbs_rmtcalllist)) {
return (FALSE);
OpenPOWER on IntegriCloud