From 0bc7ade67c5c379f22d8791f741a16489a673dd0 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Tue, 11 Feb 2003 02:17:11 +0000 Subject: There is no sense to use random random() and arc4random() in the same program. Switch to arc4random() completely. --- pw/pw_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pw/pw_user.c b/pw/pw_user.c index a2d5e78..a001e3e 100644 --- a/pw/pw_user.c +++ b/pw/pw_user.c @@ -1058,9 +1058,8 @@ pw_getrand(u_char *buf, int len) { int i; - srandomdev(); for (i = 0; i < len; i++) { - unsigned long val = random(); + unsigned long val = arc4random(); /* Use all bits in the random value */ buf[i]=(u_char)((val >> 24) ^ (val >> 16) ^ (val >> 8) ^ val); } -- cgit v1.2.3-56-ge451