diff options
author | jb <jb@FreeBSD.org> | 2007-11-20 01:51:20 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2007-11-20 01:51:20 +0000 |
commit | 19b2cc7319ecf8a74714f441340bce720cd7ac94 (patch) | |
tree | feb68916ecfeb3b0b723c598f93ca6744ffaca06 /lib/libc/rpc/rpcb_st_xdr.c | |
parent | baefe019d5c0db9d2d1f01b2bf872db3d31a0dff (diff) | |
download | FreeBSD-src-19b2cc7319ecf8a74714f441340bce720cd7ac94.zip FreeBSD-src-19b2cc7319ecf8a74714f441340bce720cd7ac94.tar.gz |
Use intermediate pointers to avoid strict alias type check failures
using gcc 4.2. This is required for tinderbox which doesn't have
-fno-strict-aliasing in it's custom CFLAGS.
Diffstat (limited to 'lib/libc/rpc/rpcb_st_xdr.c')
-rw-r--r-- | lib/libc/rpc/rpcb_st_xdr.c | 13 |
1 files changed, 9 insertions, 4 deletions
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); |