diff options
author | dholland <dholland@NetBSD.org> | 2009-05-25 23:41:23 +0000 |
---|---|---|
committer | dholland <dholland@NetBSD.org> | 2009-05-25 23:41:23 +0000 |
commit | 35b34d3f213dc7be4518355f6c23feb97762113f (patch) | |
tree | 78df1d36342b51bf86841d7bbfdb305e88f9d620 /mille | |
parent | 0381d36b77a1e707ccdd5dc70d059b73520a8e15 (diff) | |
download | bsdgames-darwin-35b34d3f213dc7be4518355f6c23feb97762113f.tar.gz bsdgames-darwin-35b34d3f213dc7be4518355f6c23feb97762113f.tar.zst bsdgames-darwin-35b34d3f213dc7be4518355f6c23feb97762113f.zip |
Use the time to call srandom(), not getpid().
Diffstat (limited to 'mille')
-rw-r--r-- | mille/mille.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mille/mille.c b/mille/mille.c index 9b269c29..41b407b1 100644 --- a/mille/mille.c +++ b/mille/mille.c @@ -1,4 +1,4 @@ -/* $NetBSD: mille.c,v 1.18 2009/05/25 23:34:50 dholland Exp $ */ +/* $NetBSD: mille.c,v 1.19 2009/05/25 23:41:23 dholland Exp $ */ /* * Copyright (c) 1982, 1993 @@ -39,10 +39,11 @@ __COPYRIGHT("@(#) Copyright (c) 1982, 1993\ #if 0 static char sccsid[] = "@(#)mille.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: mille.c,v 1.18 2009/05/25 23:34:50 dholland Exp $"); +__RCSID("$NetBSD: mille.c,v 1.19 2009/05/25 23:41:23 dholland Exp $"); #endif #endif /* not lint */ +#include <time.h> #include "mille.h" #include <signal.h> @@ -91,7 +92,7 @@ main(int ac, char *av[]) leaveok(Miles, TRUE); clearok(curscr, TRUE); #ifndef PROF - srandom(getpid()); + srandom((long) time(NULL)); #else srandom(0); #endif |