diff options
author | Neil Brown <neilb@suse.de> | 2007-03-29 13:08:06 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-03-29 13:08:06 +1000 |
commit | e6da8bc0d56d3106d663ab056b1ca484713f4d77 (patch) | |
tree | 35e4a8efe4dd70d09e935b489c99297e36779914 /utils/statd | |
parent | 7182bd393bab963cec65f2688b09e3554ef5a721 (diff) | |
download | nfs-utils-e6da8bc0d56d3106d663ab056b1ca484713f4d77.tar.gz nfs-utils-e6da8bc0d56d3106d663ab056b1ca484713f4d77.tar.xz nfs-utils-e6da8bc0d56d3106d663ab056b1ca484713f4d77.zip |
statd - remove a pointless if
The if contains a while with essentially the same condition.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'utils/statd')
-rw-r--r-- | utils/statd/monitor.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index b452082..5fcab1d 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -139,27 +139,25 @@ sm_mon_1_svc(struct mon *argp, struct svc_req *rqstp) * I'll just do a quickie success return and things should * be happy. */ - if (rtnl) { - notify_list *temp = rtnl; - - while ((temp = nlist_gethost(temp, mon_name, 0))) { - if (matchhostname(NL_MY_NAME(temp), my_name) && - NL_MY_PROC(temp) == id->my_proc && - NL_MY_PROG(temp) == id->my_prog && - NL_MY_VERS(temp) == id->my_vers) { - /* Hey! We already know you guys! */ - dprintf(N_DEBUG, - "Duplicate SM_MON request for %s " - "from procedure on %s", - mon_name, my_name); + clnt = rtnl; - /* But we'll let you pass anyway. */ - result.res_stat = STAT_SUCC; - result.state = MY_STATE; - return (&result); - } - temp = NL_NEXT(temp); + while ((clnt = nlist_gethost(clnt, mon_name, 0))) { + if (matchhostname(NL_MY_NAME(clnt), my_name) && + NL_MY_PROC(clnt) == id->my_proc && + NL_MY_PROG(clnt) == id->my_prog && + NL_MY_VERS(clnt) == id->my_vers) { + /* Hey! We already know you guys! */ + dprintf(N_DEBUG, + "Duplicate SM_MON request for %s " + "from procedure on %s", + mon_name, my_name); + + /* But we'll let you pass anyway. */ + result.res_stat = STAT_SUCC; + result.state = MY_STATE; + return (&result); } + clnt = NL_NEXT(clnt); } /* |