X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fstatd%2Fmonitor.c;h=24c2531f4cdf3cc31802c1aec67a226d2e20f19c;hp=d300338503d92a1668ff32f7de3bc9214461794f;hb=bc870150cc2116584aee288d15ac2b9a2f825ff5;hpb=18c6c616e07ec4fcd27108d87b6f02280d9687d6 diff --git a/utils/statd/monitor.c b/utils/statd/monitor.c index d300338..24c2531 100644 --- a/utils/statd/monitor.c +++ b/utils/statd/monitor.c @@ -326,12 +326,13 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp) /* Check if we're monitoring anyone. */ - if (!(clnt = rtnl)) { + if (rtnl == NULL) { note(N_WARNING, "Received SM_UNMON request from %s for %s while not " "monitoring any hosts.", my_name, argp->mon_name); return (&result); } + clnt = rtnl; /* * OK, we are. Now look for appropriate entry in run-time list. @@ -351,7 +352,7 @@ sm_unmon_1_svc(struct mon_id *argp, struct svc_req *rqstp) /* PRC: do the HA callout: */ ha_callout("del-client", mon_name, my_name, -1); - xunlink(SM_DIR, clnt->dns_name, 1); + xunlink(SM_DIR, clnt->dns_name); nlist_free(&rtnl, clnt); return (&result); @@ -379,11 +380,12 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp) result.state = MY_STATE; - if (!(clnt = rtnl)) { + if (rtnl == NULL) { note(N_WARNING, "Received SM_UNMON_ALL request from %s " "while not monitoring any hosts", my_name); return (&result); } + clnt = rtnl; while ((clnt = nlist_gethost(clnt, my_name, 1))) { if (NL_MY_PROC(clnt) == argp->my_proc && @@ -402,7 +404,7 @@ sm_unmon_all_1_svc(struct my_id *argp, struct svc_req *rqstp) temp = NL_NEXT(clnt); /* PRC: do the HA callout: */ ha_callout("del-client", mon_name, my_name, -1); - xunlink(SM_DIR, clnt->dns_name, 1); + xunlink(SM_DIR, clnt->dns_name); nlist_free(&rtnl, clnt); ++count; clnt = temp;