From 413a596f439ac842277d61847a166f6c8ea6f497 Mon Sep 17 00:00:00 2001 From: dholland Date: Wed, 20 Feb 2008 04:48:10 +0000 Subject: Use random() rather than rand(). Suggested by diffing against OpenBSD. --- monop/monop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'monop/monop.c') diff --git a/monop/monop.c b/monop/monop.c index 08509622..4741b878 100644 --- a/monop/monop.c +++ b/monop/monop.c @@ -1,4 +1,4 @@ -/* $NetBSD: monop.c,v 1.17 2008/02/19 09:45:02 dholland Exp $ */ +/* $NetBSD: monop.c,v 1.18 2008/02/20 04:48:10 dholland Exp $ */ /* * Copyright (c) 1980, 1993 @@ -39,13 +39,14 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #if 0 static char sccsid[] = "@(#)monop.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: monop.c,v 1.17 2008/02/19 09:45:02 dholland Exp $"); +__RCSID("$NetBSD: monop.c,v 1.18 2008/02/20 04:48:10 dholland Exp $"); #endif #endif /* not lint */ #include #include #include +#include #include #include "monop.def" @@ -67,7 +68,7 @@ main(ac, av) /* Revoke setgid privileges */ setgid(getgid()); - srand(getpid()); + srandom(time(NULL)); heapstart = sbrk(0); if (ac > 1) { if (!rest_f(av[1])) -- cgit v1.2.3-56-ge451