]> err.no Git - linux-2.6/commitdiff
SUNRPC: Use correct argument type in memcpy()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 11 Sep 2007 22:00:15 +0000 (18:00 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:16:40 +0000 (17:16 -0400)
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: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpcb_clnt.c

index 0bb6709018de2a044c026bc92af86fb717b90209..f88ab90b8d34d65b533ef38aeb051e94c67b422b 100644 (file)
@@ -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 */