summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-12-04 14:20:23 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-01-06 11:53:50 -0500
commita4846750f090702e2fb848ac4fe5827bcef34060 (patch)
tree657d2a61c0b6777c70eb40fcd42e44ee24a95264 /fs/lockd
parentafb03699dc0a920aed3322ad0e6895533941fb1e (diff)
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>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/mon.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index ffd3461f75e..6f6ff410341 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -37,7 +37,13 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res)
{
struct rpc_clnt *clnt;
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 = {
.rpc_argp = &args,
.rpc_resp = res,
@@ -49,12 +55,6 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res)
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));
msg.rpc_proc = &clnt->cl_procinfo[proc];