Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d0aa06a authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust
Browse files

SUNRPC: Use correct argument type in memcpy()



Noticed by Tom Talpey <tmt@netapp.com>:

OBTW, there's a nit on that memcpy, too. The r_addr is an array, so

memcpy(&map->r_addr

is passing the address of the array as a char **. It's the same as
map->r_addr, but technically the wrong type.

Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 89eb21c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ void rpcb_getport_async(struct rpc_task *task)
	map->r_xprt = xprt_get(xprt);
	map->r_netid = (xprt->prot == IPPROTO_TCP) ? RPCB_NETID_TCP :
						   RPCB_NETID_UDP;
	memcpy(&map->r_addr,
	memcpy(map->r_addr,
	       rpc_peeraddr2str(rpcb_clnt, RPC_DISPLAY_UNIVERSAL_ADDR),
	       sizeof(map->r_addr));
	map->r_owner = RPCB_OWNER_STRING;	/* ignored for GETADDR */