NSM: Use C99 structure initializer to initialize nsm_args
Clean up: Use a C99 structure initializer instead of open-coding the initialization of nsm_args. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
afb03699dc
commit
a4846750f0
|
@ -37,7 +37,13 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res)
|
||||||
{
|
{
|
||||||
struct rpc_clnt *clnt;
|
struct rpc_clnt *clnt;
|
||||||
int status;
|
int status;
|
||||||
struct nsm_args args;
|
struct nsm_args args = {
|
||||||
|
.addr = nsm_addr_in(nsm)->sin_addr.s_addr,
|
||||||
|
.prog = NLM_PROGRAM,
|
||||||
|
.vers = 3,
|
||||||
|
.proc = NLMPROC_NSM_NOTIFY,
|
||||||
|
.mon_name = nsm->sm_name,
|
||||||
|
};
|
||||||
struct rpc_message msg = {
|
struct rpc_message msg = {
|
||||||
.rpc_argp = &args,
|
.rpc_argp = &args,
|
||||||
.rpc_resp = res,
|
.rpc_resp = res,
|
||||||
|
@ -49,12 +55,6 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&args, 0, sizeof(args));
|
|
||||||
args.mon_name = nsm->sm_name;
|
|
||||||
args.addr = nsm_addr_in(nsm)->sin_addr.s_addr;
|
|
||||||
args.prog = NLM_PROGRAM;
|
|
||||||
args.vers = 3;
|
|
||||||
args.proc = NLMPROC_NSM_NOTIFY;
|
|
||||||
memset(res, 0, sizeof(*res));
|
memset(res, 0, sizeof(*res));
|
||||||
|
|
||||||
msg.rpc_proc = &clnt->cl_procinfo[proc];
|
msg.rpc_proc = &clnt->cl_procinfo[proc];
|
||||||
|
|
Loading…
Reference in New Issue