1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +00:00

Use srandomdev() now

This commit is contained in:
Andrey A. Chernov 1997-03-24 14:52:51 +00:00
parent f31679a94b
commit 42a7afc08c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24213

View File

@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: des_rw.c,v 1.7 1997/02/22 14:37:07 peter Exp $
*/
/*
@ -230,7 +230,8 @@ des_write(fd, buf, len)
*/
if(!seeded) {
seeded = 1;
srandom((unsigned)time(NULL));
if (srandomdev() < 0)
srandom((unsigned long)(time(NULL) ^ getpid()));
}
for(i = 0 ; i < 8 ; i+= sizeof(long)) {