From e18b78350bd6e3bdb474f8d2f9b1d608bf5fb59c Mon Sep 17 00:00:00 2001 From: mickey Date: Wed, 5 Apr 2000 21:54:48 +0000 Subject: [PATCH] do not exhaust the random pool while debugging --- sys/ddb/db_hangman.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/ddb/db_hangman.c b/sys/ddb/db_hangman.c index 6bdc2cafff0..790afe2121c 100644 --- a/sys/ddb/db_hangman.c +++ b/sys/ddb/db_hangman.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_hangman.c,v 1.13 1998/04/26 21:40:50 deraadt Exp $ */ +/* $OpenBSD: db_hangman.c,v 1.14 2000/04/05 21:54:48 mickey Exp $ */ /* * Copyright (c) 1996 Theo de Raadt, Michael Shalayeff @@ -65,9 +65,7 @@ static __inline size_t db_random(mod) register size_t mod; { - size_t ret; - get_random_bytes(&ret, sizeof(ret)); - return ret % mod; + return arc4random() % mod; } static __inline char * -- 2.20.1