From ccc90fdead1867eb64036614c19b6e37f4f9d299 Mon Sep 17 00:00:00 2001 From: djm Date: Fri, 16 Nov 2007 05:08:39 +0000 Subject: use arc4random_bytes() instead of multiple arc4random() calls; ok deraadt@ dlg@ henric@ mcbride@ --- sys/dev/softraid.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/dev/softraid.c') 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 * @@ -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 -- cgit v1.2.3-59-g8ed1b