diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2007-11-16 05:08:40 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2007-11-16 05:08:40 +0000 |
commit | 64b2ea406a218d1075510d5fdbb6bd30b2c0825f (patch) | |
tree | bae36432224b34feb677620e8af46ca10cc9b85a /sys/dev | |
parent | 58f36b90b0592c0c12ad394e861611431eb4db5d (diff) |
use arc4random_bytes() instead of multiple arc4random() calls;
ok deraadt@ dlg@ henric@ mcbride@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/softraid.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 8f209fdb8d7..23f99ef80cf 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.84 2007/09/11 13:39:33 gilles Exp $ */ +/* $OpenBSD: softraid.c,v 1.85 2007/11/16 05:08:39 djm Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -1754,10 +1754,7 @@ sr_checksum(char *s, u_int32_t *p, u_int32_t size) void sr_get_uuid(struct sr_uuid *uuid) { - int i; - - for (i = 0; i < SR_UUID_MAX; i++) - uuid->sui_id[i] = arc4random(); + arc4random_bytes(uuid->sui_id, sizeof(uuid->sui_id)); } void |