lib_uuid_create: try use hardware random number generators first
Try the hardware random number generators is better for uuid generator Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
parent
8d09eaaee0
commit
821196eb22
1 changed files with 2 additions and 2 deletions
|
@ -76,10 +76,10 @@ void uuid_create(FAR uuid_t *u, FAR uint32_t *status)
|
|||
{
|
||||
int ret;
|
||||
|
||||
ret = uuid_getrandom(u, sizeof(uuid_t), 0);
|
||||
ret = uuid_getrandom(u, sizeof(uuid_t), GRND_RANDOM);
|
||||
if (ret < 0)
|
||||
{
|
||||
ret = uuid_getrandom(u, sizeof(uuid_t), GRND_RANDOM);
|
||||
ret = uuid_getrandom(u, sizeof(uuid_t), 0);
|
||||
}
|
||||
|
||||
if (ret < 0)
|
||||
|
|
Loading…
Reference in a new issue