diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-04-05 21:54:49 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-04-05 21:54:49 +0000 |
commit | 877b9513bede679e076041485236506ce0015e2b (patch) | |
tree | b70ade42ea526c9f86b19f1da7b782040fbeb186 /sys/ddb/db_hangman.c | |
parent | 22ee9ddc2b6b5e5cc3462f515242d634ad1d5135 (diff) |
do not exhaust the random pool while debugging
Diffstat (limited to 'sys/ddb/db_hangman.c')
-rw-r--r-- | sys/ddb/db_hangman.c | 6 |
1 files 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 * |