diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-12-04 14:20:23 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-01-06 11:53:50 -0500 |
commit | a4846750f090702e2fb848ac4fe5827bcef34060 (patch) | |
tree | 657d2a61c0b6777c70eb40fcd42e44ee24a95264 /fs | |
parent | afb03699dc0a920aed3322ad0e6895533941fb1e (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')
-rw-r--r-- | fs/lockd/mon.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index ffd3461f75ef..6f6ff410341a 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) | |||
37 | { | 37 | { |
38 | struct rpc_clnt *clnt; | 38 | struct rpc_clnt *clnt; |
39 | int status; | 39 | int status; |
40 | struct nsm_args args; | 40 | struct nsm_args args = { |
41 | .addr = nsm_addr_in(nsm)->sin_addr.s_addr, | ||
42 | .prog = NLM_PROGRAM, | ||
43 | .vers = 3, | ||
44 | .proc = NLMPROC_NSM_NOTIFY, | ||
45 | .mon_name = nsm->sm_name, | ||
46 | }; | ||
41 | struct rpc_message msg = { | 47 | struct rpc_message msg = { |
42 | .rpc_argp = &args, | 48 | .rpc_argp = &args, |
43 | .rpc_resp = res, | 49 | .rpc_resp = res, |
@@ -49,12 +55,6 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res) | |||
49 | goto out; | 55 | goto out; |
50 | } | 56 | } |
51 | 57 | ||
52 | memset(&args, 0, sizeof(args)); | ||
53 | args.mon_name = nsm->sm_name; | ||
54 | args.addr = nsm_addr_in(nsm)->sin_addr.s_addr; | ||
55 | args.prog = NLM_PROGRAM; | ||
56 | args.vers = 3; | ||
57 | args.proc = NLMPROC_NSM_NOTIFY; | ||
58 | memset(res, 0, sizeof(*res)); | 58 | memset(res, 0, sizeof(*res)); |
59 | 59 | ||
60 | msg.rpc_proc = &clnt->cl_procinfo[proc]; | 60 | msg.rpc_proc = &clnt->cl_procinfo[proc]; |