summaryrefslogtreecommitdiff
path: root/sbin/newfs_msdos
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-03-29 20:01:27 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-03-29 20:01:27 +0000
commitc11ba21b3331fcb74f2c7dc2f2e8e78b8425b18e (patch)
treea4ebebea1c8b4f0d8b65a03e86cae6b406fcd03e /sbin/newfs_msdos
parent0f0aedfb6c864e664653aa97725f7eb25b2c8bce (diff)
Use arc4random() not random().
Diffstat (limited to 'sbin/newfs_msdos')
-rw-r--r--sbin/newfs_msdos/newfs_msdos.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c
index 5bf676ca96c..5a1723c6ca3 100644
--- a/sbin/newfs_msdos/newfs_msdos.c
+++ b/sbin/newfs_msdos/newfs_msdos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs_msdos.c,v 1.5 1997/03/22 02:51:06 kstailey Exp $ */
+/* $OpenBSD: newfs_msdos.c,v 1.6 1997/03/29 20:01:26 millert Exp $ */
/*
* Copyright (c) 1995, 1996 Joerg Wunsch
@@ -180,8 +180,7 @@ setup_boot_sector_from_template(bs, dp)
bs->bsec.variable_part.extended.extboot = dp->ext_extboot;
/* assign a "serial number" :) */
- srandom((unsigned) time((time_t) 0));
- l_to_little_l(bs->bsec.variable_part.extended.serial, random());
+ l_to_little_l(bs->bsec.variable_part.extended.serial, arc4random());
memcpy((void *) bs->bsec.variable_part.extended.label,
(void *) dp->ext_label, 11);