Fix compiler warnings.
[tinc] / lib / pidfile.c
index 54a6b4c..250f67b 100644 (file)
@@ -33,6 +33,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <sys/types.h>
+#include <signal.h>
 #include <fcntl.h>
 
 /* read_pid
@@ -73,6 +74,7 @@ int check_pid (char *pidfile)
    * be found -- GW
    */
   /* But... errno is usually changed only on error.. */
+  errno = 0;
   if (kill(pid, 0) && errno == ESRCH)
          return(0);