diff options
author | ache <ache@FreeBSD.org> | 1997-06-14 00:27:03 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1997-06-14 00:27:03 +0000 |
commit | 66946f930588a5258a235e5cfaac5d2085445620 (patch) | |
tree | d21484bd0330527c7e1660f2d64ee0a4fdd01014 /usr.bin | |
parent | 1b5fc58b0b83c6f4268bdcfa1f6b16335729bbde (diff) | |
download | FreeBSD-src-66946f930588a5258a235e5cfaac5d2085445620.zip FreeBSD-src-66946f930588a5258a235e5cfaac5d2085445620.tar.gz |
Remove srandomdev fallback code
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/jot/jot.c | 7 | ||||
-rw-r--r-- | usr.bin/passwd/local_passwd.c | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index dba1804..39b6d55 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -96,10 +96,9 @@ main(argc, argv) getargs(argc, argv); if (randomize) { *x = (ender - begin) * (ender > begin ? 1 : -1); - if (s == -1.0) { - if (srandomdev() < 0) - srandom(time(NULL) ^ getpid()); - } else + if (s == -1.0) + srandomdev(); + else srandom((unsigned long) s); for (*i = 1; *i <= reps || infinity; (*i)++) { *y = (double) random() / LONG_MAX; diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c index b64f4f7..5e8a4bc 100644 --- a/usr.bin/passwd/local_passwd.c +++ b/usr.bin/passwd/local_passwd.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: local_passwd.c,v 1.16 1997/03/24 16:10:26 ache Exp $ + * $Id: local_passwd.c,v 1.17 1997/05/10 19:02:38 davidn Exp $ */ #ifndef lint @@ -155,8 +155,7 @@ getnewpasswd(pw, nis) /* grab a random printable character that isn't a colon */ if (!randinit) { randinit = 1; - if (srandomdev() < 0) - srandom((unsigned long)(time(NULL) ^ getpid())); + srandomdev(); } #ifdef NEWSALT salt[0] = _PASSWORD_EFMT1; |