chiark / gitweb /
locking: Fix uninitialized variable.
[misc] / locking.c
index 735ba47ba553352ff53cb699e428aa37a7e9f9a8..cd4e81d898eb06e011d43ddeea2038b0811af392 100644 (file)
--- a/locking.c
+++ b/locking.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: locking.c,v 1.1 2003/10/09 15:05:34 mdw Exp $
+ * $Id$
  *
  * Lock a file, run a program
  *
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: locking.c,v $
- * Revision 1.1  2003/10/09 15:05:34  mdw
- * Lots of stuff.
- *
- * Revision 1.3  2003/09/24 14:58:08  mdw
- * Fix options parsing again.
- *
- * Revision 1.2  2003/09/24 14:14:03  mdw
- * Fix option handling behaviour.
- *
- * Revision 1.1  2003/05/11 13:30:04  mdw
- * Initial checkin.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <errno.h>
@@ -51,6 +34,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -78,7 +62,7 @@ static void usage(FILE *fp)
 
 static void version(FILE *fp)
 {
-  pquis(fp, "$ (toys, version " VERSION "\n");
+  pquis(fp, "$ (version " VERSION ")\n");
 }
 
 static void help(FILE *fp)
@@ -112,7 +96,7 @@ int main(int argc, char *argv[])
   struct flock l;
   char *p;
   int t = -1;
-  unsigned int ot;
+  unsigned int ot = 0;
   time_t nt;
   pid_t kid;
   int st;