From: mickey Date: Wed, 5 Apr 2000 21:54:48 +0000 (+0000) Subject: do not exhaust the random pool while debugging X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e18b78350bd6e3bdb474f8d2f9b1d608bf5fb59c;p=openbsd do not exhaust the random pool while debugging --- 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 *