diff options
author | jwise <jwise@NetBSD.org> | 2000-11-30 22:06:04 +0000 |
---|---|---|
committer | jwise <jwise@NetBSD.org> | 2000-11-30 22:06:04 +0000 |
commit | 962b76a979befb56046bcf41c361b870ef171b14 (patch) | |
tree | f672df9f17c54011e28f7d09a3e177705af57190 /sail/main.c | |
parent | 57a75ab7b9a0f4999cae7c0fa5acb46f230f38f2 (diff) | |
download | bsdgames-darwin-962b76a979befb56046bcf41c361b870ef171b14.tar.gz bsdgames-darwin-962b76a979befb56046bcf41c361b870ef171b14.tar.zst bsdgames-darwin-962b76a979befb56046bcf41c361b870ef171b14.zip |
Use random() instead of rand(), and seed from time(3) instead of from getpid().
Diffstat (limited to 'sail/main.c')
-rw-r--r-- | sail/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sail/main.c b/sail/main.c index 5db425de..e3ea98c1 100644 --- a/sail/main.c +++ b/sail/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.11 2000/11/30 22:02:20 jwise Exp $ */ +/* $NetBSD: main.c,v 1.12 2000/11/30 22:06:04 jwise Exp $ */ /* * Copyright (c) 1983, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\ #if 0 static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: main.c,v 1.11 2000/11/30 22:02:20 jwise Exp $"); +__RCSID("$NetBSD: main.c,v 1.12 2000/11/30 22:06:04 jwise Exp $"); #endif #endif /* not lint */ @@ -71,7 +71,7 @@ main(int argc, char **argv) exit(1); close(fd); - srand(getpid()); + srandom((u_long)time(NULL)); if ((p = strrchr(*argv, '/')) != NULL) p++; |