]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
2000-07-04 H.J. Lu <hjl@lucon.org> nfs-utils-0-1-9-1
authorhjl <hjl>
Wed, 5 Jul 2000 00:16:57 +0000 (00:16 +0000)
committerhjl <hjl>
Wed, 5 Jul 2000 00:16:57 +0000 (00:16 +0000)
* utils/statd/log.c: Include <stdlib.h> for exit ().

* utils/statd/misc.c (xunlink): Add `{' and `}' to quiet the
gcc warning.

ChangeLog
utils/statd/log.c
utils/statd/misc.c

index b225aef188ba58f1e8ec1e41c424d152b213f577..44bef0a5bb2292cac148b689d24551c38145e4c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-07-04  H.J. Lu <hjl@lucon.org>
+
+       * utils/statd/log.c: Include <stdlib.h> for exit ().
+
+       * utils/statd/misc.c (xunlink): Add `{' and `}' to quiet the
+       gcc warning.
+
 2000-07-04  H.J. Lu <hjl@lucon.org>
 
        * configure.in (VERSION): Set to "0.1.9.1".
 2000-07-04  H.J. Lu <hjl@lucon.org>
 
        * configure.in (VERSION): Set to "0.1.9.1".
index cf903af47e4965260fb849662a7275679b53b6f8..bf66547aa50546169e99b67f79fcda0b3bdf1d82 100644 (file)
@@ -16,6 +16,7 @@
 #include <syslog.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <syslog.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
 #include <time.h>
 #include <string.h>
 #include <stdarg.h>
 #include <time.h>
index 42f6e57d7dfff07c0efaf0cc3ce43fdd8c8f01b1..d2365d647bb7e5fd86f82c6e87ad3166830d7256 100644 (file)
@@ -62,11 +62,12 @@ xunlink (char *path, char *host, short int check)
   tozap=alloca (strlen(path)+strlen(host)+2);
   sprintf (tozap, "%s/%s", path, host);
 
   tozap=alloca (strlen(path)+strlen(host)+2);
   sprintf (tozap, "%s/%s", path, host);
 
-  if (!check || !nlist_gethost(rtnl, host, 0))
+  if (!check || !nlist_gethost(rtnl, host, 0)) {
     if (unlink (tozap) == -1)
       log (L_ERROR, "unlink (%s): %s", tozap, strerror (errno));
     else
       dprintf (L_DEBUG, "Unlinked %s", tozap);
     if (unlink (tozap) == -1)
       log (L_ERROR, "unlink (%s): %s", tozap, strerror (errno));
     else
       dprintf (L_DEBUG, "Unlinked %s", tozap);
+  }
   else
     dprintf (L_DEBUG, "Not unlinking %s--host still monitored.", tozap);
 }
   else
     dprintf (L_DEBUG, "Not unlinking %s--host still monitored.", tozap);
 }