Commit 44a15afe authored by Chuck Lever's avatar Chuck Lever Committed by Linus Torvalds

[PATCH] use C99 static struct initializers

fix up the last remaining static struct initializers in the RPC client and
portmapper.
parent ec213433
......@@ -130,7 +130,12 @@ void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int);
static __inline__
int rpc_call(struct rpc_clnt *clnt, u32 proc, void *argp, void *resp, int flags)
{
struct rpc_message msg = { proc, argp, resp, NULL };
struct rpc_message msg = {
.rpc_proc = proc,
.rpc_argp = argp,
.rpc_resp = resp,
.rpc_cred = NULL
};
return rpc_call_sync(clnt, &msg, flags);
}
......
......@@ -42,7 +42,12 @@ rpc_getport(struct rpc_task *task, struct rpc_clnt *clnt)
{
struct rpc_portmap *map = &clnt->cl_pmap;
struct sockaddr_in *sap = &clnt->cl_xprt->addr;
struct rpc_message msg = { PMAP_GETPORT, map, &clnt->cl_port, NULL };
struct rpc_message msg = {
.rpc_proc = PMAP_GETPORT,
.rpc_argp = map,
.rpc_resp = &clnt->cl_port,
.rpc_cred = NULL
};
struct rpc_clnt *pmap_clnt;
struct rpc_task *child;
......@@ -90,7 +95,12 @@ rpc_getport(struct rpc_task *task, struct rpc_clnt *clnt)
int
rpc_getport_external(struct sockaddr_in *sin, __u32 prog, __u32 vers, int prot)
{
struct rpc_portmap map = { prog, vers, prot, 0 };
struct rpc_portmap map = {
.pm_prog = prog,
.pm_vers = vers,
.pm_prot = prot,
.pm_port = 0
};
struct rpc_clnt *pmap_clnt;
char hostname[32];
int status;
......
......@@ -905,7 +905,12 @@ tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb,
unsigned int offset, size_t len)
{
struct rpc_xprt *xprt = (struct rpc_xprt *)rd_desc->buf;
skb_reader_t desc = { skb, offset, len };
skb_reader_t desc = {
.skb = skb,
.offset = offset,
.count = len,
.csum = 0
};
dprintk("RPC: tcp_data_recv\n");
do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment