]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/statd/monitor.c
Add -Wstrict-prototypes to compiler args, and fix warnings caused.
[nfs-utils.git] / utils / statd / monitor.c
index c447a269bb9b86f2c82091ff7844e6cb693977ac..eadc43441fbd1e6a0ebeba00b6f5e6ca77754432 100644 (file)
@@ -280,7 +280,7 @@ void load_state(void)
                        b = strchr(buf, '\n');
                        if (b) *b = 0;
                        sscanf(buf, "%x %x %x %x ",
-                              &addr, &prog, &vers, &proc, myname);
+                              &addr, &prog, &vers, &proc);
                        b = buf+36;
                        for (i=0; i<SM_PRIV_SIZE; i++) {
                                sscanf(b, "%2x", &p);
@@ -380,8 +380,8 @@ 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);
                        nlist_free(&rtnl, clnt);
-                       xunlink(SM_DIR, mon_name, 1);
 
                        return (&result);
                } else
@@ -445,8 +445,8 @@ 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);
                        nlist_free(&rtnl, clnt);
-                       xunlink(SM_DIR, mon_name, 1);
                        ++count;
                        clnt = temp;
                } else