summaryrefslogtreecommitdiffstats
path: root/games/worms
diff options
context:
space:
mode:
authorpjanzen <pjanzen@openbsd.org>1999-10-29 03:59:01 +0000
committerpjanzen <pjanzen@openbsd.org>1999-10-29 03:59:01 +0000
commitbf592bebfbf37227dd139a640b2caa4d8b043295 (patch)
treece8971c3f67a3b11b9f8264da3b9730ad35efea7 /games/worms
parentetherip statistics (diff)
downloadwireguard-openbsd-bf592bebfbf37227dd139a640b2caa4d8b043295.tar.xz
wireguard-openbsd-bf592bebfbf37227dd139a640b2caa4d8b043295.zip
srandom() for variety.
Diffstat (limited to 'games/worms')
-rw-r--r--games/worms/worms.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/games/worms/worms.c b/games/worms/worms.c
index 72b834d2cf1..b5c0296209a 100644
--- a/games/worms/worms.c
+++ b/games/worms/worms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: worms.c,v 1.8 1998/08/19 07:42:24 pjanzen Exp $ */
+/* $OpenBSD: worms.c,v 1.9 1999/10/29 03:59:06 pjanzen Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: worms.c,v 1.8 1998/08/19 07:42:24 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: worms.c,v 1.9 1999/10/29 03:59:06 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -71,6 +71,7 @@ static char rcsid[] = "$OpenBSD: worms.c,v 1.8 1998/08/19 07:42:24 pjanzen Exp $
#include <stdio.h>
#include <stdlib.h>
#include <term.h>
+#include <time.h>
#include <unistd.h>
static struct options {
@@ -254,6 +255,7 @@ main(argc, argv)
exit(1);
}
+ srandom(time((time_t *)NULL));
if (!(term = getenv("TERM"))) {
(void)fprintf(stderr, "worms: no TERM environment variable.\n");
exit(1);